Add a Custom Operation to an Existing Framework
This task explains how to add a custom Author mode operation to an existing document type.
- Setup a sample project by following the instructions for installing the SDK. The framework project is
oxygen-sample-framework. - A number of classes in the
simple.documentation.framework.operationspackage implement thero.sync.ecss.extensions.api.AuthorOperationinterface. Depending on your use-case, modify one of these classes. - Pack the operation class inside a Java jar library.
- Copy the jar library to the
[OXYGEN_INSTALL_DIR]/frameworks/[FRAMEWORK_DIR]directory. - 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.- In the Classpath tab, add a new entry similar to:
${framework}/customAction.jar. - In the Author tab, add a new action that uses your custom operation.
- Mount the action to the toolbars or menus.
- In the Classpath tab, add a new entry similar to:
- Share the modifications with your colleagues. The files that should be shared are
your
customAction.jarlibrary and the.frameworkconfiguration file from the[OXYGEN_INSTALL_DIR]/frameworks/[FRAMEWORK_DIR]directory.