Copyright © 2007, 2008, 2009, 2010, 2011, 2012, 2013 Lars Vogel
|Revision 0.1 - 0.7||14.08.2007 - 03.09.2007||Lars
|Revision 0.8 - 7.2||03.11.2008 - 16.08.2013||Lars
|Several bug fixes and enhancements|
Table of Contents
The set of plug-ins which you can use for your development is defined by the plug-ins in your workspace in addition with the plug-ins defined by your target platform.
By default your Eclipse IDE installation is used as target platform, for example, to provide the SWT and JFace plug-ins.
You can specify your target platform with a target definition file . With such a file you define the available plug-ins and features. This can be based on remote p2 update sites.
A target definition file is typically shared between the developers to ensure that everyone is using the same basis for development.
Developing against your IDE installation has the following disadvantages:
it makes you dependent on your version of the Eclipse IDE
it can lead to problems if developers are using different versions of Eclipse because the API might be different
it makes it difficult to upgrade the set of available plug-ins for every developer at the same time
it also requires that you install every plug-in required for your product either in your workspace or in your Eclipse IDE
it can happen that you might unintentionally add plug-ins from the Eclipse IDE to your development
To solve these problems, it is recommended to configure a target platform explicitly via a target definition file.
A target definition file can be created via→ → → → .
You can add new locations via the Software Site and specify the URL.button in the location section. To add an Eclipse p2 update site, select
After you created your target definition file, you can set it as the target platform in your Eclipse IDE via thelink in the Target definition editor as depicted in the following screenshot.
You can switch the target platform in the Eclipse Preferences. Select→ → → .
The most effective way of defining your target platform is to use p2 update sites. These are of the same type as the update sites that you use to install a new set of plug-ins. If the content in the update sites defined by your target platform changes, your local set of plug-ins can be updated.
It is also possible to define your target platform based on plug-ins in your file system, but this is not recommended as certain build system like Maven/Tycho do not support file based target definition files.
I hope you enjoyed this part of the Eclipse 4 series. Of course there is much more, check out the "Eclipse 4 development" section under my lists of Eclipse Plug-in and Eclipse RCP Tutorials section.
You find a complete and extended description of Eclipse 4 RCP development in the upcoming Eclipse 4 RCP book of Lars Vogel.
vogella Training Android and Eclipse Training from the vogella team
Android Tutorial Introduction to Android Programming
Eclipse RCP Tutorial Create native applications in Java
JUnit Tutorial Test your application
Git Tutorial Put all your files in a distributed version control system