Eclipse comes with the RCP Mail template example which demonstrates how to develop an RCP application. Pluginbuilder also uses this example to show how to set up a build with pluginbuilder, check the results at http://rcpsample.pluginbuilder.org. The build results include executables for several platforms, test and coverage results.
Eclipse 3.5 and Pluginbuilder 0.8.0.x
- Install Eclipse 3.5
- Add Pluginbuilder (at least version 0.8.0)
- Add a Subversion provider (subclipse or subversive)
- Create a new workspace and check out all projects from the following location: https://svnroot.pluginbuilder.org/bma/svnroot/rcpsample
- Download the target platform or create one including the Eclipse platform, the RCP Delta pack and SWT Bot. Set it as the target platform for the workspace
Now all the projects should be building in your workspace. There are two ways to run a headless build. Either you modify the local properties of the existing Pluginbuilder project org.pluginbuilder.rcpsample.build or you create a new Pluginbuilder project.
Modify local properties
- Double-click pluginbuilder.config
- Switch to the Local tab
- Set the buildDirectory, eclipseDir and targetPlatfrom properties
- Switch to the General tab and click Build Head
Create a new Pluginbuilder project
- Select File->New->Project...
- Choose Plug-in Development/Plug-in Builder Project
- Enter the name of the project, e.g build
- Double-click build/pluginbuilder.config
- Add the features org.pluginbuilder.rcpsample.feature and org.pluginbuilder.rcpsample.test_feature
- Either use subversion or copy from workspace as source repository
- Click Generate Build Files
- Go to the Local tab and enter the targetPlatform property
- Return to the General tab and click Build Head
Run the tests:
- Go to the Tests tab
- Check Run Tests
- Set the autotest.testapplication to org.pluginbuilder.rcpsample.application
- Optionally enable coverage by checking pluginbuilder.is.runcoverage
- If you also want to run the SWT Bot tests, make sure that your test host includes the SWT Bot
Build RCP application:
- Copy the org.pluginbuilder.rcpsample.build/rcpsample.product to the current project
- Go to the RCP tab
- Enter rcpsample.product into the product field
- Select the platforms for which to build the RCP application
The tutorial also describes how to set up the workspace but it is still targeting Eclipse 3.3.
Earlier Eclipse/pluginbuilder versions
There is a branch available for Eclipse 3.3/Pluginbuilder 0.6.0 installations at https://svnroot.pluginbuilder.org/bma/svnroot/rcpsample/branches/eclipse3_3