![]() |
In the Creating New Extension Points: How Others Can Extend Your Plug-in lecture you learned how to
define new extensions using extension points.
The solution defined in project com.ibm.lab.soln.extensionpoint
demonstrates how to write an extensible plug-in that offers the possibility for other plug-ins to extend. It defines a common toolbar pulldown,
conceptually similar to the Run > External Tools menu choice:
com.ibm.lab.soln.extensionpoint.test
,
demonstrates how to extend the first plug-in.
To run the example, launch the run-time instance of Eclipse (Run > Run As > Run-time Workbench).
The contributed menu choices are shown from the toolbar menu pulldown ().
If you have customized the perspective, you may need to explicitly add the "Soln: Tool Actions"
action set (Window > Customize Perspective... > Other).
As described above, this solution is partitioned into two projects. All but the last
class in this table are contained in the com.ibm.lab.soln.extensionpoint
project.
Class (All) | Description |
ExtensionProcessor |
Processes extension point contributions to com.ibm.lab.soln.extensionpoint.toolAction .
|
IToolAction |
Interface that all tool action contributions to the com.ibm.lab.soln.extensionpoint.toolAction
extension point must implement, that is, the class specified in the tool attribute of the <action> tag.
|
TestToolAction |
Quick test of implementation; action displays an information message. |
ToolActionParameters |
Encapsulates parameters specified in the <action> tag.
|
ToolActionsPulldownDelegate |
Handles menu choice selections from the common toolbar pulldown and delegates them to its associate tool action
(IToolAction ).
|
ContributedTestToolAction |
Similar to TestToolAction ,
this is contributed by another plug-in, in project
com.ibm.lab.soln.extensionpoint.test . It also displays
an information message, and parses some of the parameters supplied as part of the IConfigurationElement interface.
|
© Copyright International Business Machines Corporation, 2003.
All rights reserved.