Add a Custom Operation to an Existing Framework

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

  1. Setup a sample project by following the instructions for installing the SDK. The framework project is oxygen-sample-framework.
  2. A number of classes in the simple.documentation.framework.operations package implement the ro.sync.ecss.extensions.api.AuthorOperation interface. Depending on your use-case, modify one of these classes.
  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. Open the Preferences dialog box , go to Document Type Association, and edit the document type (you need write access to the [OXYGEN_INSTALL_DIR]) to open the Document Type configuration dialog box.
    1. In the Classpath tab, add a new entry similar to: ${framework}/customAction.jar.
    2. In the Author tab, add a new action that uses your custom operation.
    3. Mount the action to the toolbars or menus.
  6. Share the modifications with your colleagues. The files that should be shared are your customAction.jar library and the .framework configuration file from the [OXYGEN_INSTALL_DIR]/frameworks/[FRAMEWORK_DIR] directory.

Was this helpful?