Add content page

A content page extension point is used to add a content page 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 IBM MQ Explorer. For the methods that this class must contain, refer to the IBM MQ Explorer Javadoc documentation. For information on how to access the IBM MQ Explorer Javadoc documentation, see API Reference.

    A working example of this class is available in the simple plugin, 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 IBM MQ Explorer Javadoc documentation.

    A working example of this class is available in the simple plugin, called SimpleContentPageFactory.java