Skip to content

Setting up your development environment

Nate Titterton edited this page Sep 13, 2013 · 2 revisions

Grab a recent 4.x RCP/RAP eclipse

Kepler (4.3) is here: http://eclipse.org/downloads/packages/eclipse-rcp-and-rap-developers/keplerr

set up the target platforms

We'll be writing plugins that need to work on 3.7 and later. So, we'll need to test our stuff appropriately. When developing plugins, you run/debug an "eclipse application" which starts up another eclipse called the "target platform". Its typical that the target platform is based on the eclipse you are using to develop the plugins -- this is never ideal, but won't work for us.

In your development eclipse

  • go to preferences, filter on "target" and select Plug-in Development | Target Platform
  • you'll see that "running platform" is there -- that is the typical case we talked about before.
  • click Add...
  • select 'Nothing'
  • rename "New Target" to "3.7 vanilla" or something
  • In the "locations..." tab, click "Add..." and select "Software Site"
  • Enter "http://download.eclipse.org/eclipse/updates/3.7" in the "work with" field
  • it will think for a while. You want to select only "Eclipse SDK" (I'm pretty sure, lol). The checkboxes at the bottom are probably fine with the defaults. Clicking OK will download a ton of stuff.

You only have one target definition active at one time. Probably you want 3.7 active, but it is useful to switch between 3.7 and, say, a 4.3 target platform sometimes to better test things.

When you have multiple target definitions, though, you really need to have multiple run configuations -- these are what you use to start the target eclipse up. The reason you should have multiple is that each target definition really should point to a separate workspace, since 3.7 and 4.3 (say) configure their workspaces differently. (Yes, the target platform that will run has its own workspace on your disk, separate from the workspace your development eclipse uses) So:

  • Select the menu "Run | Run Configurations"
  • You'll see "Eclipse Applications" listed on the left -- that is a run configuration template. There might be run configuration instances listed below it (and inset). You could edit the existing instance, or make a new one (which we'll do below):
  • right click on the "Eclipse Application" template and select "New"
  • this will be for the 3.7 target, so name it "3.7 target" or something
  • in the "Main" tab, under "workspace data", enter into the location field something like "${workspace_loc}/../runtime-3.7-eclipse-WORKSPACE". This will use the directory in the same parent dir as your development workspace, and name is "runtime-3.7...".
  • You'll manually need to use this "run configuration" when you are testing your plugins when you have the 3.7 target platform selected, and a different run configuration (with a different workspace) when you have a different target platform selected. Wouldn't it be nice to have this work automagically? Yes, it would.

Sometimes things get screwed up in the definitions of the target platform or the run configuration -- what I've seen is that a bad subset of the available plugins are selected to be used. I have no idea why, but

  • in the appropriate run configuration, in the "plugins" tab, make sure everything is selected (if you are using a target definition other than "running platform" which you should!). If you are using the "running platform" target definition, well, you probably don't want every cockamainy plugin that you have installed (to help you develop plugins) running!
  • There might be things in the target definition itself that also can be tweaked -- like in the "content" tab.

Set up git repos