In this blog post I’ll show you some Eclipse RCP example applications that you can use to explore the Eclipse RCP platform.
RCP Mail 2.0 is an enhanced version of the “RCP Mail” template which comes with Eclipse. It was created by Michael Scharf, Kai Toedter, Boris Bokowski, Francis Upton IV, Frank Gerhardt and Paul Webster for their EclipseCon 2009 tutorial “RCP Mail 2.0: Commands, Common Navigator, and Data Binding ”. The project is currently in discussion for inclusion as an official example, see bug #253105 and #290029.
It shows best practices for RCP features like Commands, Handlers, Data Binding, Common Navigator and Branding.
To setup the project, download the sources from the RCP Mail 2.0 site. In
/steps/handout you’ll find some instructions. Just import the projects from the archive file using
Import > Existing projects into Workspace. Choose to import
rcpmail-99 and execute the included launch configuration
If you’re want to have a look at a real Eclipse RCP application that still is manageable in size, check out the RSSOwl News reader. It’s written by Benjamin Pasero. This news feed reader is entirely built on the Eclipse RCP platform. The code is pretty readable and well-structured and documented. Worth mentioning is that the application uses an embedded db4o object database to store its data. This database is accessed from application-internal DAO objects. Also, a Lucene search index is kept for all feeds and can be searched in the application.
To play around with the code, go to the RSSOwl Developer resources page and check out the project from the SVN repository. Import the plug-in and feature projects in your local workspace. Launch the application from
org.rssowl.ui/Launch RSSOwl 2.0.launch
MP3 Manager is a music player example application written by Kai Tödter. He went to great lengths to use each and every feature of the Eclipse RCP platform. Especially worth mentioning are the p2 enabled headless build, changing the language dynamically using a workbench restart, using the Presentation API to customize the look and feel, having different brandings, many different use cases of JFace viewers, using the property views, providing a native Windows installer and lots and lots more.
To setup the project, go to the MP3 Manager Trac site and check out the sources from the SVN. Import all projects using
Import > Existing projects into Workspace and launch the application from one of the launch files included in the branding plug-ins.
EBERT is a simple travel expense tracking application written by Wayne Beaton. It has been “single-sourced”, so it can run as RCP application on the desktop, as RAP application on the web and as eRCP application on mobile devices. For this, it only utilizes the
CDC-1.1/Foundation-1.1 execution environment (a subset of the Java SE 1.4 libraries). Apart from that, it uses OSGi Declarative Services to provide the data storage for the UI (data is stored using Java serialization). It has some master/detail views and utilizes Nebula components like the
To setup the project, download the Team Project Set
rcp.psf from the EBERT project page and import it using
File > Import > Team Project Set. This will check out the project from the Eclipse CVS. Start the product
org.eclipse.examples.expenses.application.rcp/ebert.rcp.product to launch the application.
The last example application is an address book. This is what participants of my German Eclipse RCP trainings build in the practical parts of the training. The
simple variant shows the usage of basic RCP features whereas the
eclipse edition uses non-RCP Eclipse components like Help and Forms and makes use of advanced features like JFace Data Binding.
To setup the project, download the source projects as archive from the project page (or clone them from
github) and import them using
Import > Existing projects into Workspace. Run
com.example.addressbook/addressbook.product to launch the application.