Home
Add content page
A content page extension point is used to add a content pages to the content view. A content page can be associated with a tree node.
The following code extract is taken from the file, plugin.xml, from the simple plug-in and shows a basic implementation of the content page extension point:
<extension id="com.ibm.mq.explorer.sample.simpleContentPage" name="Simple ContentPage" point="com.ibm.mq.explorer.ui.addcontentpage"> <contentPage pluginId="com.ibm.mq.explorer.sample.simple" name="com.ibm.mq.explorer.sample.simple" class="com.ibm.mq.explorer.sample.simple.SimpleContentPageFactory" contentPageId="com.ibm.mq.explorer.sample.simple"> </contentPage> </extension>As well as declaring the content page extension point in plugin.xml, the following classes are needed:
- A class that contains methods that perform a number of functions such as return the content page id, create the content page, and set the object to draw the page. This class must extend com.ibm.mq.ui.extensions.ContentsPage. The class com.ibm.mq.explorer.ui.extensions.ContentTitleBar can be used to create a title for the content page consistent with the other content pages in the WebSphere MQ Explorer. 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 SimpleContentPage.java.
- A class that contains a method that returns an instance of the class extending ContentPage. This class must implement com.ibm.mq.explorer.ui.extensions.IContentPageFactory, and IExecutableExtension. 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 SimpleContentPageFactory.java
Parent topic:
Utilizing extension points
fa12390_
Home