Introduction 1 Lars Vogel 4/22/2009
Who am I? Eclipse as a platform What is Eclipse RCP? Extension Points / Extensions Equinox SWT & JFace View coupeling Summary 2 Lars Vogel 4/22/2009
Lars Vogel ◦ Working for SAP AG as a product manager responsible for SAP Transportation Management ◦ Open source enthusiastic ◦ Active in the Java and Eclipse ecosystem 3
Eclipse RCP distribution, via Or installation of feature „Eclipse RCP“ via the Eclipse update manager 4 Lars Vogel 4/22/2009
Platform ◦ Small runtime ◦ Complex applications can be extensible without the need to adjust existing code 5 Runtime Platform Application Extensible Application Lars Vogel 4/22/2009
Nov – Code released as open Source Juni 2004 – Eclipse 3.0 based on OSGi and enables Eclipse RCP Current Eclipse (aka Ganymede) 6 Lars Vogel 4/22/2009
Local running application using the native widget toolkit Based on the Eclipse runtime and technology Eclipse RCP applications can be standalone or may require server communication 7 Lars Vogel 4/22/2009
Component model Rich user experience Platform (OS) independent Extensible Re-use of existing Eclipse functionality Helps avoiding writing boilerplate code, e.g. automatic update Excellent community 8 Lars Vogel 4/22/2009
9 Application ApplicationWorkbenchAdvisor ApplicationWorkbenchWindowAdvisor ApplicationActionBarAdvisor Calls PlattfromUI.createAndRunWorkbench Defines the initial perspective Settings for the window, e.g. toolbar visible, etc Defines initial Actions (outdated) Lars Vogel 4/22/2009
MANIFEST.MF – Defines OSGi bundle plugin.xml – Defines Eclipse extensions and extension points build.properties – property file for export PDE (Plug-in Development Environement) provides editors for these files. 10 Lars Vogel 4/22/2009
Extension Points allow to add functionality to pre- defined points Each plug-in can define it‘s own extension points allowing other to contribute Each plug-in can define extensions, providing functionality to pre-defined extension points RCP developer use primary the existing platfrom extension points to define their application 11 Lars Vogel 4/22/2009
plugin.xml contains description of all extensions and extension points Contributions are only loaded when they are needed -> lazy loading to save memory and keep startup time small 12 *Graphic Source: Internet Lars Vogel 4/22/2009
A command in Eclipse is a declarative description of a component and is independent from the implementation details. A command can be categorized Key binding can be assigned to the command. 13 Lars Vogel 4/22/2009
14 Runtime / Equinox SWT JFace Workbench … … … … Other Plug-ins… Lars Vogel 4/22/2009
Reference implementation of OSGi Dynamic module system Wildly used, e.g. in application servers Allows to ◦ Define dependencies between Plug-ins ◦ Hide plug-in internal implementation details Eclipse plug-in is always an OSGi bundle and vice versa 15 Equinox Lars Vogel 4/22/2009
View available for plug-in dependency analysis Graphical tool can be found on visualization/ visualization/ 16 Lars Vogel 4/22/2009
Plug-in(s) for the domain model Plug-in(s) for the core functionality Plug-in(s) for the UI functionality Modularity allows you to grow as you go 17 Lars Vogel 4/22/2009
SWT Standard Widget Toolkit ◦ Thin layer upon the native GUI libraries ◦ JNI calls ◦ Not a lot of conviniant functionality 18 *Screenshot from the Internet
JFace ◦ UI toolkit that provides helper classes for developing UI features ◦ Tables / TreeViewer / Dialogs / ◦ Can be based on models ◦ Databinding Workbench ◦ multi-window environment ◦ manages views, editors, perspectives 19 Lars Vogel 4/22/2009
Viewer: Table / Treeviewer: Responsible for the UI LabelProvider: How is the domain model represented ModelProvider: Delivery the domain model ViewerSorter: Sorts values in the viewer ViewerFilter: Filters values ◦ 20 Viewer – UI, shows data Viewer – UI, shows data ContentProvider – „Dao“ for viewer ContentProvider – „Dao“ for viewer LabelProvider – Which data is represented how LabelProvider – Which data is represented how Lars Vogel 4/22/2009
View / Viewer can be selection provider, e.g. getSite().setSelectionProvider(viewer); Another view can register without knowing which view are responible for the changes ◦ Needs to implement ISelectionListener ◦ Must itself register as SelectionListener, via getSite().getWorkbenchWindow().getSelectionService().addSel ectionListener(this) Allows Loose Coupeling 21 Lars Vogel 4/22/2009
Contains the branding, e.g. splashscreen, icons, „About“ dialog Configuration for different operating systems Used for exporting the final application 22 Lars Vogel 4/22/2009
Find in Eclipse which parts you are looking at Make coding analysis and re-use extremly easy Shortcut Alt+Shift+F1 Add org.eclipse.pde.runtime and org.eclipse.ui.forms as dependency to have Plug-in Spy in your own RCP application 23 Lars Vogel 4/22/2009
Eclipse RCP is a powerful framework to develop native looking, modular, extensible applications. „Billions“;-) of new API‘s to learn…. Very powerful but complex framework 24 Lars Vogel 4/22/2009
The whole world of Eclipse projects is available for RCP ◦ Modelling (EMF) ◦ Reporting (BIRT) ◦ Graphical Editors (GEF, GMF, Zest) ◦ Automatic Updates (p2 Update) ◦ Presentation Framework ◦ PDE Build / PDE JUnit ◦ Internationalization Eclipse RCP in the Web -> Eclipse RAP Eclipse RCP on the mobile device -> eRCP Eclipse E4 ◦ Styling of UI components via CSS ◦ XWT -> allows declarative UI definition 25 Lars Vogel 4/22/2009
Introduction to Eclipse RCP ◦ Eclipse RCP podcast ◦ Jeff.McAffer.mp3?source=podcasts Book: Eclipse Rich Client Platform ◦ By Jeff McAffer and Jean-Michel Lemieux ◦ Addison-Wesley Professional ◦ Attention: Second Edition planned for June Lars Vogel 4/22/2009