An extension point is a formal declaration in a plugin.xml file that customization is allowed. Customization takes the place of other plugins (any other plugin) providing a little chunk of xml describing the customization that is requested.

In practice most extention points allow the xml to indicate a class of some sort (where all the magic occurs). If we were just doing straight up object oriented programming we would handle this kind of thing by allowing other to provide a stratagy object that conformed to a specific interface.

It works the same way with most extention points, when they allow a class contribution they indicate what interface is required.

But remember this is not straight up object oriented programming, that chunk of xml (the extention) also needs to correspond to an interface. In XML speak that is what is know as an XML Schema.

Here is a link to the extention points used by udig right now: udig extention points. In addition to these extention points you can use any of the extention points defined by the Eclipse RCP application (allowing you do do everything from additional view to online help).


When the class/interface is extended to create a plug-in the plugin.xml file must be undated with the appropriate information.

for example:

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin
	id="com.example.helloworld"
	name="Helloworld Plugāˆ’in"
	version="1.0.0"
	provider="EXAMPLE"
	class="com.example.helloworld.HelloworldPlugin">

   <runtime>
    <library name="helloworld.jar">
     <export name="*"/>
	</library>
   </runtime>

   <requires>
	<import plugin="org.eclipse.ui"/>
	<import plugin="org.eclipse.core.runtime"/>
	<import plugin="org.eclipse.core.runtime.compatibility"/>
   </requires>

   <extension
         point="org.eclipse.ui.views">
      <category
            name="Hello Category"
            id="com.example.helloworld">
      </category>
      <view
            name="Hello View"
            icon="icons/sample.gif"
            category="com.example.helloworld"
            class="com.example.helloworld.HelloWorldView"
            id="com.example.helloworld.HelloWorldView">
      </view>
   </extension>

</plugin>

Notice the <extension> tag. The extension point for this example hello world plug-in is the org.eclipse.ui.views class.

The above example code can be found in the section:
"Plug it in: Hello World meets the workbench"
of the "Platform Plug-in Developer Guide":
org.eclipse.platform.doc.isv_3.0.1.pdf
Located on Eclipse's documentation page:
http://www.eclipse.org/documentation/main.html

The Plugin.xml file contains the XML code that allows the Eclipse run-time engine to execute new plug-ins. By specifing an "Extension Point" in the xml file Eclipse can run the class and because the class implements an already existing interface Eclipse knows what functions it must run.

[view] [edit]
(c) Copyright (c) 2004,2005 Refractions Research Inc. and others.