View RSS Feed

My Java Tips

Eclipse project - Extension page

Rate this Entry
by , 11-17-2011 at 06:16 PM (925 Views)
Extensions are the central mechanism for contributing behavior to the platform. Unless your plug-in is a simple Java API library made available to other plug-ins, new behavior is contributed as an extension.


The Extensions page is where you can add, remove and modify the extensions your plug-in contributes to the platform.


Each extension point comes with an xml schema specifying its grammar. Your extension's syntax must therefore follow that grammar in order to be processed correctly. When you create a new extension, PDE extracts the grammar for the corresponding extension point and populates the context menu of each element selected in the Extensions viewer with a list of valid child elements that you can create.

Also, for each selected element in the body of an extension, PDE populates the Extension Element Details section with all the valid attributes for that element. Required attributes are denoted with an asterisk.

When you hover your mouse over an attribute name, a tooltip box appears describing the purpose of that attribute.

When an attribute expects the name of a Java class as a value, e.g. the class attribute above, clicking on the name of the attribute will open the Java file specified if it exists. If the file does not exist, then clicking on the class link will bring up the JDT New Class wizard to create a new Java class on the fly. PDE will prime the wizard with the correct superclass and/or interface when the schema for the extension point specifies this information for the given attribute.

Submit "Eclipse project - Extension page" to Facebook Submit "Eclipse project - Extension page" to Digg Submit "Eclipse project - Extension page" to del.icio.us Submit "Eclipse project - Extension page" to StumbleUpon Submit "Eclipse project - Extension page" to Google

Categories
Eclipse

Comments