Contributing an Operation Extension
Here are the steps for a transformation contributor to extend an existing operation:
-
Create a Plug-In Project.
- Update the project dependencies:
- Open the META-INF/MANIFEST.MF file in your project.
- Select the Dependencies tab in the opened editor.
- 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
- Add an operation extension:
- Open the META-INF/MANIFEST.MF file in your project.
- Select the Extensions tab in the opened editor.
- Click the Add... button in the All Extensions section,
and select the extension point com.sodius.mdw.core.operation
- 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.
Developing Operations