Example: Adding a Custom View in Oxygen XML Editor
To add a custom view in Oxygen XML Editor, follow this procedure:
- Locate the plugin.xml descriptor file for your plugin (should be
located inside the plugins folder, for example, [OXYGEN_INSTALL_DIR]/plugins/myPlugin).
Define the ID of the view you want to add and specify the location where it will be
placed:
<view id="SampleWorkspaceAccessID" initialSide="WEST" initialRow="0"/>
- In your Workspace Access Plugin Extension implementation, where the
applicationStarted
callback is received, add a view component customizer like this:pluginWorkspaceAccess.addViewComponentCustomizer(new ViewComponentCustomizer() { public void customizeView(ViewInfo viewInfo) { if( //The view ID defined in the "plugin.xml" "SampleWorkspaceAccessID".equals(viewInfo.getViewID())) { cmsMessagesArea = new JTextArea("CMS Session History:"); viewInfo.setComponent(new JScrollPane(cmsMessagesArea)); viewInfo.setTitle("CMS Messages"); viewInfo.setIcon(Icons.getIcon(Icons.CMS_MESSAGES_CUSTOM_VIEW_STRING)); } } });
- Define the
cmsMessagesArea
as a static field (if you can access the messages area from anywhere in your code).