How to Add a Custom Action to an Existing Document Type

This task explains how to add a custom Author operation to an existing document type.

  1. Download the Author SDK toolkit:http://www.oxygenxml.com/developer.html#XML_Editor_Authoring_SDK
  2. Create a Java project with a custom implementation of ro.sync.ecss.extensions.api.AuthorOperation which performs your custom operation and updates the Author page using our API like: AuthorAccess.getDocumentController().insertXMLFragment.
  3. Pack the operation class inside a Java jar library.
  4. Copy the jar library to the OXYGEN_INSTALL_DIR/frameworks/framework_dir directory.
  5. Go to Oxygen Preferences > Document Type Association page and set the user role to Developer (you need write access to the OXYGEN_INSTALLATION_DIR). Edit the document type.
    1. In the Classpath tab, add a new entry like: ${frameworks}/docbook/customAction.jar.
    2. In the Author tab, add a new action which uses your custom operation.
    3. Mount the action to the toolbars or menus.
  6. Share the modifications with your colleagues. The files which should be shared are your customAction.jar library and the .framework configuration file from the OXYGEN_INSTALL_DIR/frameworks/framework_dir directory.