History | Edit

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

  1. Setup a sample project by following the instructions for installing the SDK. Our sample framework project is oxygen-sample-framework.
  2. A variety 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 your framework directory (for example, [OXYGEN_INSTALL_DIR]/frameworks/[FRAMEWORK_DIR]).
  5. Open the Preferences dialog box (Options > Preferences), 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 reference to your JAR library (for example, ${framework}/customAction.jar).
    2. Go to the Author tab, then go to the Actions subtab.
    3. Click the New button and use the Action dialog box to create a new action that uses your custom operation.
    4. Mount the action to the toolbars or menus. You can also define a shortcut key.
  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.