Eclipse Training - Introduction

343 views
236 views

Published on

Eclipse Training - Introduction

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
343
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
8
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Eclipse Training - Introduction

  1. 1. Eclipse Plug-ins and RCP Training Course Introduction and Architecture October 2013Copyright © 2013 Luca D’Onofrio – RCP Solutions 1
  2. 2. 1. Eclipse Introduction and Architecture 2. Standard Widgets Toolkit 3. JFace 4. Standard Extension Points and APIs 5. Defining your own Extension Points 6. Rich Client Platforms & Industrialization Training Course Agenda October 2013Copyright © 2013 Luca D’Onofrio – RCP Solutions 2
  3. 3. ∗ Eclipse IDE is a multi-domain, multi-language Integrated Development Environment ∗ Eclipse is an Extensible platform for tool integration based on industry standards ∗ Cross-platform environment ∗ EPL (Eclipse Public License): let you build an distribute commercially-friendly open/closed source software ∗ Eclipse Foundation and Development Community support Introduction Why Eclipse? October 2013 3 Copyright © 2013 Luca D’Onofrio – RCP Solutions
  4. 4. ∗ Overcome the following challenges that may arise regularly in the development of tools: ∗ Pressure to cut costs ∗ Reducing integration time ∗ Cost effective, secure and easy maintenance ∗ Deliver value and reduce risks ∗ Automation of software updates ∗ Standardization Introduction Advantages (1/3) October 2013 4 Copyright © 2013 Luca D’Onofrio – RCP Solutions
  5. 5. ∗ Create a new business model that relies on shifting the commercial value away from the actual products and generating revenue from the auxiliary services around the product: ∗ systems integration ∗ enrich business solutions ∗ support ∗ customizations ∗ tutorials and documentation Introduction Advantages (2/3) October 2013 5 Copyright © 2013 Luca D’Onofrio – RCP Solutions
  6. 6. ∗ Proprietary software lack in imagination. They have only one business model: ∗ “EULA Ware — Give me money. Now go away. It doesn’t work? Go away. You want your money back? Read your EULA, and go away. You want to see the software? Go away.” ∗ Open source forces companies to use their imagination. They can’t feed people EULA Ware, so they must make money in other ways: ∗ “Support Ware — Pay us money and we’ll support the software. We’ll answer your questions. Or we’ll try to. Over the phone, on the Web, whatever. Pay us enough and we’ll come over.” ∗ “Project Ware — Need something done? We’ll do it. Pay us for our work, and pay us for the project. Or try our software and buy our hardware.” ∗ “Foundation Ware — Our software has a foundation. (e.g. base your product on the Eclipse related environment and tools)” ∗ The great thing about Eclipse World is that you don’t have to use just one business model. You can mix-and-match as you see fit. A new business model October 2013 6 Copyright © 2013 Luca D’Onofrio – RCP Solutions
  7. 7. Eclipse Releases and Packages ∗ Current releases ∗ Eclipse Kepler (4.3) ∗ Archived releases ∗ Eclipse Juno (4.2) ∗ Eclipse Indigo (3.7) ∗ Eclipse Helios (3.6) ∗ Eclipse Galileo (3.5) ∗ Main Packages ∗ JDT (Java/Java EE) ∗ PDE (RCP/RAP) ∗ CDT (C/C++) ∗ WTP (Web) ∗ EMF (Modeling) ∗ XML ∗ BIRT ∗ GIT, SVN, … ∗ UML ∗ XText October 2013Copyright © 2013 Luca D’Onofrio – RCP Solutions 7
  8. 8. ∗Java ∗XML ∗Design Patterns Course Pre-Requisites October 2013 8 Copyright © 2013 Luca D’Onofrio – RCP Solutions
  9. 9. 1. Eclipse General Architecture 2. Eclipse UI a) Workbench, Workspace and Resources, Perspectives, Views and editors, Preference and Properties pages, Menu and Toolbar, Launch configurations. 3. Eclipse Plug-ins Ecosystem a) OSGI, Bundles and Manifest b) Plugins, Extensions, Extension Points, Features, RCP 4. Using the PDE a) Creating, debugging and delivering plugins, fragments, features and update sites. Agenda October 2013 9 Copyright © 2013 Luca D’Onofrio – RCP Solutions
  10. 10. Eclipse General Architecture October 2013 10 Copyright © 2013 Luca D’Onofrio – RCP Solutions
  11. 11. ∗ The term Workbench refers to the desktop development environment. The Workbench aims to achieve seamless tool integration and controlled openness by providing a common paradigm for the creation, management, and navigation of workspace resources. ∗ Each Workbench window contains one or more perspectives. Perspectives contain views and editors and control what appears in certain menus and tool bars. ∗ More than one Workbench window can exist on the desktop at any given time. TIP: command line and JVM arguments Eclipse UI Workbench October 2013 11 Copyright © 2013 Luca D’Onofrio – RCP Solutions
  12. 12. ∗ The workspace is the container that allows a user to gather various source code files and resources and work with them as a cohesive unit. ∗ TIP: “Do I have to duplicate then my projects if using with different versions of Eclipse in parallel?” NO, because the workspace folder does not have to have the projects in it (as folders). They can, but it is not needed. ∗ TIP: Workspace preferences ∗ TIP: Workspace .metadata (workspace structure and platform dependent settings) Eclipse UI Workspace October 2013 12 Copyright © 2013 Luca D’Onofrio – RCP Solutions
  13. 13. ∗ Eclipse handles its own file system that manage resources ∗ Eclipse file system provides internal features that allow the synchronization between local platform- dependent file system. ∗ Files: Comparable to files as you see them in the file system. ∗ Folders: Comparable to directories on a file system. In the Workbench, folders are contained in projects or other folders. Folders can contain files and other folders. ∗ Projects: Contain folders and files. Projects are used for builds, version management, sharing, and resource organization. Like folders, projects map to directories in the file system. (When you create a project, you specify a location for it in the file system.) ( .project, Working sets). A project is either open or closed. TIP: closed projects require less memory. Since they are not examined during builds, closing a project can improve build time. ∗ Linked Resources: Folders and files can be linked to locations in the file system outside of the project's location. These special folders and files are called linked resources. TIP: Different tools that plug into the Workbench use their own specialized types of projects, folders, and files. Eclipse UI Resources October 2013 13 Copyright © 2013 Luca D’Onofrio – RCP Solutions
  14. 14. ∗ Perspective: ∗ A perspective defines the initial set and layout of views in the Workbench window. Within the window, each perspective shares the same set of editors. Each perspective provides a set of functionality (menus / toolbars) aimed at accomplishing a specific type of task or works with specific types of resources. ∗ Editor: ∗ Specialized view that USUALLY operates on file resources and provides mechanisms for resource life-cycle. ( sync example) ∗ Any number of editors can be open at once, but only one can be active at a time. The main menu bar and toolbar for the Workbench window contain operations (editor contribution) that are applicable to the active editor. ∗ View: ∗ Views support editors and provide alternative presentations as well as ways to navigate the information in your Workbench. ( Project Explorer, Problems, Errors, Properties, …) ∗ Views can have their own menus and toolbars TIP: Editor can be instantiated more then once; usually there is only one instance of a view. Eclipse UI Perspectives, Editors and Views October 2013 14 Copyright © 2013 Luca D’Onofrio – RCP Solutions
  15. 15. ∗ Menus: ∗ Menu bar ∗ Popup menu ∗ Toolbars: ∗ Workbench main toolbar and editor contributions ∗ Views related toolbar ∗ Preferences: ∗ Control the behavior of Workbench features ∗ Properties: ∗ Control the behavior of Resources features. ∗ Workspace related (.settings) Eclipse UI Menus, Toolbars, Preference and Properties October 2013 15 Copyright © 2013 Luca D’Onofrio – RCP Solutions
  16. 16. ∗ Toobar commands ∗ Popup menu commands ∗ Build-in run configurations ∗ Run / Debug ∗ External tools Eclipse UI Launch configurations October 2013 16 Copyright © 2013 Luca D’Onofrio – RCP Solutions
  17. 17. ∗ Everything can be extended ∗ Everything can be referenced by its own id Eclipse UI Concepts and Terms October 2013 17 Platform PlatformUI Selection Providers Selection Events Resource Change Jobs Commands Handlers Actions Multipage Editor Form Editor Pref/Prop Pages Project Natures Project Builders Resource Path Copyright © 2013 Luca D’Onofrio – RCP Solutions
  18. 18. Eclipse Plug-ins Ecosystem OSGI October 2013 18 ∗ The OSGi technology is a set of specifications that define a dynamic component system for Java. ∗ These specifications enable a development model where applications are (dynamically) composed of many different (reusable) components. ∗ Bundles : Bundles are the OSGi components made by the developers. terms plug-in and bundle are interchangeable ( class hierarchy). ∗ Services : The services layer connects bundles in a dynamic way by offering a publish-find-bind model for plain old Java objects. ∗ Life-Cycle : The API to install, start, stop, update, and uninstall bundles. ∗ Modules : The layer that defines how a bundle can import and export code. ∗ Security : The layer that handles the security aspects. ∗ Execution Environment : Defines what methods and classes are available in a specific platform. Copyright © 2013 Luca D’Onofrio – RCP Solutions
  19. 19. ∗ Manifest-Version ∗ Bundle-ManifestVersion: ∗ Bundle-Name ∗ Bundle-SymbolicName ∗ Bundle-Version ∗ Bundle-Activator ∗ Bundle-Vendor ∗ Require-Bundle ∗ Bundle-RequiredExecutionEnvironment ∗ Bundle-ActivationPolicy ∗ Bundle-ClassPath ∗ Export-Package TIP: An Activator class can be «singleton» TIP: Accessing an activator or a plugin class requires the containing plugin to be loaded, where interacting with the Bundle interface not. Eclipse Plug-ins Ecosystem Bundles and Manifest October 2013 19 Copyright © 2013 Luca D’Onofrio – RCP Solutions
  20. 20. Eclipse Plug-ins Ecosystem October 2013 20 Copyright © 2013 Luca D’Onofrio – RCP Solutions
  21. 21. ∗ The PDE provides a comprehensive plug-in development environment. ∗ PDE Views ∗ The Plugin registry view ∗ The Plugins view ∗ The Plugin dependencies view ∗ The Plugin Spy (Alt+Shift+F1) ∗ PDE Wizards ∗ Plugins Wizard & Extension Templates ∗ Features Wizard ∗ Update Site Wizard ∗ Running and Debugging your plugins TIP: You can use fragments to extends functionality of another plugin: typically there are used to supply alternative language packs or platform specific implementation classes. Using the PDE October 2013 21 Copyright © 2013 Luca D’Onofrio – RCP Solutions
  22. 22. ∗ www.eclipse.org ∗ Eclipse SDK update site ∗ help.eclipse.org ∗ wiki.eclipse.org ∗ www.osgi.org References October 2013 22 Copyright © 2013 Luca D’Onofrio – RCP Solutions
  23. 23. ∗ Eclipse Plug-ins (3rd Edition): Building Commercial-Quality Plug-ins (Eclipse Series) - Eric Clayberg e Dan Rubel (11 dic. 2008) ∗ Design Patterns: Elements of Reusable Object-Oriented Software - Gamma, Erich, Helm, Richard, Johnson, Ralph e Vlissides, John (31 ott. 1994) ∗ Thinking In Java: The definitive introduction to object-oriented programming in the language of the world wide... - Bruce Eckel (3 feb. 2006) ∗ Xml Bible di Elliotte Rusty Harold e Harold (17 ago. 1999) ∗ XML Programming Bible: Bible Series, Book 129 Books October 2013 23 Copyright © 2013 Luca D’Onofrio – RCP Solutions

×