Eclipse Plugin Development
Eclipse is a powerful development environment with many features. Unfortunately, this can make it hard to understand. This page will be an ongoing record of documentation Elvis members have found particularly useful while developing Eclipse plug-ins.
It is important to realize that Eclipse is constantly changing, so any documentation (especially books) can become out of date quickly. The most reliable documentation should be that available from Eclipse itself via Help -> Help Contents. This gives access to the Workbench User Guide, Platform Plug-in Developer Guide, JDT Plug-in Developer Guide, and Plug-in Development Environment Guide. These are generally not much fun to read.
Contributing to Eclipse (Gamma and Beck) - This is a great book for coming to grips with the basics of plug-in development. Unfortunately, it came out in 2004, so some of the information is dated.
Understanding how Eclipse plug-ins work with OSGi
- A discussion of how the contents of the plugin.xml and manifest.mf changed around Eclipse 3.1 (2006)
The Eclipse forums
are a good place to get answers to many mysterious questions.
The source code for Eclipse's plug-ins can provide useful examples of how to use Eclipse's APIs. Unfortunately, source code can be hard to locate. For example, org.eclipse.jdt.internal.corext.* can be found in the org.eclipse.jdt.ui plug-in! Google code search
can be helpful for finding out the sometimes mysterious code organization.
Depending on which download was used in the Eclipse installation, source code may be found in the plug-ins directory, e.g. (eclipse installation)/plugins/org.eclipse.jdt.ui.source_3.5.1.r351_v20090821-0800.jar. Alternatively, you can obtain the source code via CVS
. A tutorial
describes how to create an Eclipse project using the source.
To be able to run JUnit tests in a plug-in environment, you may need to add the following "Required Plug-ins" to your plug-in Dependency list: org.eclipse.jdt.junit, org.junit4. You may need to add junit.framework to your imported packages.