Chapter 11. Developing a Plug-in: The Plug-in Development Environment, Manifests, and Extension Points

     

In this chapter and the next , we're going to start modifying Eclipse itself. So far, we've been using it as we've downloaded it, adding a few prebuilt plug-ins as needed. Now we're going to start creating our own plug-ins. Eclipse was built as an extensible IDE, and we're going to extend it.

As you know, plug-ins are stored in folders in the plugins directory, and that's where the ones we create will go. These folders typically have names like org.eclipse.swt.win32_2.1.1 or org.junit_3.8.1 , where the folder name is the plug-in name , followed with an underscore and a version number. When Eclipse loads a plug-in that has several folders in the plugins directory, it checks the version number in order to load only the most recent version.

You'll typically find the following files in every plug-in's folder:


*.jar

Java code for the plug-in


about.html

Displayed when the user asks for info about the plug-in


plugin.properties

Holds string data used by plugin.xml


plugin.xml

Plug-in manifest that describes the plug-in to Eclipse


lib

Holds additional JAR files


icons

Directory for icons (GIF format is standard)

We'll see these various files as we develop plug-ins, but we'll start with the minimum needed. The plugin.xml file is the plug-in manifest, which tells Eclipse about the plug-in. In fact, that's the only file you really need to create a plug-in as far as Eclipse is concerned .



Eclipse
Eclipse
ISBN: 0596006411
EAN: 2147483647
Year: 2006
Pages: 114
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net