Contributing an Operation Extension

Here are the steps for a transformation contributor to extend an existing operation:

  1. Create a Plug-In Project.
  2. Update the project dependencies:
    1. Open the META-INF/MANIFEST.MF file in your project.
    2. Select the Dependencies tab in the opened editor.
    3. Click the Add... button in the Required Plug-ins section, and add the following plugins:
      • com.sodius.mdw.core
      • the plugin that declares the operation service to extend
  3. Add an operation extension:
    1. Open the META-INF/MANIFEST.MF file in your project.
    2. Select the Extensions tab in the opened editor.
    3. Click the Add... button in the All Extensions section, and select the extension point com.sodius.mdw.core.operation
    4. Add a operation extension, and fill the necessary information as described in the operation extension point.
      • Set the 'extends' attribute to reference the id of the operation extension point you want to make a contribution.
      • Set the 'factory' attribute to reference an instance of OperationFactory

The contributed operation factory must be a subclass of the factory declared by the extension point. The contributed operation factory uses getter methods defined by its super class to retrieve necessary information and instantiates the contributed operation.

The contributed operation executes in the same context as other operations of the transformation, with the same access rights on models and variables. The contributed operation can typically create new model elements, perform pre or post processings, change attribute values, etc.

Related tasks
Developing Operations