Eclipse Plug-in Development Environment
by, 11-17-2011 at 07:58 PM (1550 Views)
The Eclipse Plug-in Development Environment (PDE) provides a set of tools that assist the developer in every stage of plug-in development from genesis to deployment. The Plug-in Development Environment (PDE) is freely distributed as part of the Eclipse SDK, and serves as a good example of an Eclipse-based IDE tool.
In PDE, each plug-in under development is represented by a single Java project. Plug-in projects have certain unique characteristics that make them what they are; for example, each has a plug-in descriptor (a manifest and/or a plugin.xml file), a dynamic classpath based on dependencies specified in the descriptor, special builders, and other configuration properties. PDE provides a plug-in creation wizard that creates plug-in projects populated with the required essentials.
PDE comes with a special multi-page editor that makes plug-in development easier. The Plug-in Manifest Editor actually spans three files—the bundle manifest (META-INF/MANIFEST.MF), plugin.xml, and build.properties. It allows you to edit all properties necessary to describe a plug-ins basic run-time requirements, dependencies, extensions, extension points, and so on.
Because Eclipse plug-ins are essentially Java projects, they are built incrementally by default, and no special manual build steps are necessary. However, PDE makes it possible to create unattended builds using Ant; you can create an Ant build script for your plug-in (in Package Explorer, right-click your plugin.xml and choose PDE Tools -> Create Ant Build File), which provides targets for creating various build outputs (such as plug-in JARs, source archives, and so forth).
To test-run your work, PDE provides a special launch configuration type that allows you to launch another workbench instance (referred to as the run-time workbench) with your workspace plug-ins included in its configuration (this is also referred to as self-hosting—you don't have to install your plug-ins into an external workbench just to test-run them; instead, you can use your own development workbench installation, dynamically). Your Eclipse launch configuration will allow you to specify which plug-ins you want included, special command-line arguments, environment properties, and so on.
PDE also comes with a solid user documentation, as well as extensive reference information (Javadoc and Extension Point documentation). Because it is released under the same terms as Eclipse itself, its source code is freely available and in fact included by default with the SDK.