Home
Add tree node
A tree node extension point is used to add a tree node to the navigation view and associate it with a content page.
The following code extract is taken from the file, plugin.xml, from the simple plug-in and shows a basic implementation of the tree node extension point:
<extension id="com.ibm.mq.explorer.samples.simpleTreeNode" name="Simple TreeNode" point="com.ibm.mq.explorer.ui.addtreenode"> <treeNode pluginId="com.ibm.mq.explorer.sample.simple" name="com.ibm.mq.explorer.sample.simple" class="com.ibm.mq.explorer.sample.simple.SimpleTreeNodeFactory" treeNodeId="com.ibm.mq.explorer.sample.simple" sequence="888"> </treeNode> </extension>As well as declaring the tree node extension point in plugin.xml, the following classes are needed:
- A class that contains a method that checks the id of any incoming tree node to determine whether to add sub nodes to it. This class must implement com.ibm.mq.explorer.ui.extensions.ITreeNodeFactory, and IExecutableExtension. For the methods that this class must contain refer to the WebSphere MQ Explorer JavaDoc. For information on how to access the WebSphere MQ Explorer JavaDoc, see Accessing Javadoc.
A working example of this class is available in the simple plug-in, called SimpleTreeNodeFactory.java
- A class that contains methods that return information about any new tree nodes, such as the name, id, and the associated content page class. This class must extend com.ibm.mq.ui.extensions.TreeNode. For the methods that this class must contain refer to the WebSphere MQ Explorer JavaDoc.
A working example of this class is available in the simple plug-in, called SimpleTreeNode.java.
Parent topic:
Utilizing extension points
fa12380_
Home