11.1 All You Really Need Is plugin.xml

     

Creating a very simple plug-in is easy enoughall you need is a working plugin.xml . To show how this works, you can use a text editor to create a new plug-in manifest, plugin.xml , for a fictional plug-in named org.eclipsebook.first . In this case, we'll set the plug-in's name, ID, version number, and the name of its provider like this:

 <?xml version="1.0" encoding="UTF-8"?> <plugin     id="org.eclipsebook.first"     name="First Plug-in"     version="1.0.0"     provider-name="Steve"> </plugin> 

Just store plugin.xml in plugins\org.eclipsebook.first_1.0.0 and restart Eclipse. You can find the new plug-in in the plug-in registry, which is where Eclipse holds data about all current plug-ins. To see that data, select Help About Eclipse Platform and click the Plug-in Details button, opening the About Eclipse Platform Plug-ins dialog you see in Figure 11-1.

Figure 11-1. The plug-in registry
figs/ecps_1101.gif

You can see the new, fictional plug-in in the registry, near the bottom.

If an Eclipse project has a plug-in manifest, it's considered a plug-in project.


That's a nice exercise but it doesn't go very far in extending Eclipse. Developing a real plug-in involves creating multiple files, including multiple code files. The good news is that Eclipse has built-in wizards to help you out.



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