Copyright © 2007, 2008, 2009, 2010, 2011, 2012 Lars Vogel
|Revision 0.1 - 0.7||14.08.2007 - 03.09.2007||Lars
|Revision 0.8 - 7.1||03.11.2008 - 12.04.2012||Lars
|Several bug fixes and enhancements|
Table of Contents
If you develop Eclipse plug-ins, you reuse components of the Eclipse platform, for example SWT or JFace.
By default these plug-ins are sourced directly from your Eclipse IDE.
This is not an ideal approach, as this makes you dependent on your version of the Eclipse IDE. This can lead to problems, if developers are using different versions of Eclipse. It also makes it difficult to upgrade these plug-ins for everyone at the same time.
If you followed this approach you would also need to install every plug-in required for your product either in your workspace or in your Eclipse IDE.
Another problem with this approach is that you might unintentionally add plug-ins from the Eclipse IDE to your product.
Via a target platform you define the set of plug-ins which are available for development. For example you define which version of the SWT and JFace plug-in is part of your target platform.
This makes you independent from the Eclipse IDE you are using. Developers with different versions of Eclipse will compile their work against the same set of plug-ins.
is defined via a
file. This target
of plug-ins and features. You
typically share this
target file between different developers to
ensure that everyone is
using the same basis for development.
The most effective way of defining your Target Platform is to use an (Eclipse p2) update sites. These are of the same type as update sites which you use to install a new set of plug-ins. If the content in the update site defined by your target platform is changed, your local set of plug-ins can also be updated.
It is also possible to define your target platform based on plug-ins in your file system.
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 have defined your Target Definition file, you can set it as the target in your Eclipse IDE via thebutton.
You can switch the target platform in the Eclipse Preferences. Select→ → → .
Before posting questions, please see the vogella FAQ. If you have questions or find an error in this article please use the www.vogella.com Google Group. I have created a short list how to create good questions which might also help you.
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 everything you have under distributed version control system