Creating transformation extensions

To create a transformation extension, you must create an extension for the com.ibm.xtools.transform.core.transformationExtensions extension point.

About this task

To create a transformation extension:

Procedure

  1. Create an Eclipse plug-in project:
    1. Click File > New > Project.
    2. In the New Project wizard, on the Select a wizard page, in the Wizards pane, click Plug-in Project.
    3. Click Next.
    4. In the New Plug-in Project wizard, on the Plug-in Project page, in the Project name field, specify a project name. On the remaining pages of the wizard, if you specify a name that contains spaces, the spaces are converted to underscores in the plug-in identifier (ID) and plug-in name. Accept the default values for the other fields on this page.
  2. Click Next.
  3. On the Plug-in Content page, accept the default values, and click Next.
  4. Click Finish. If you are prompted to switch to the Plug-in Development perspective, click Yes.
  5. Create a TransformationExtension element in the plug-in manifest file:
    1. In the navigation view, in the plug-in project that you created in step 1, in the META-INF folder, double-click MANIFEST.MF.
    2. In the plug-in manifest editor, on the Extensions tab, click Add.
    3. In the New Extension wizard, on the Extension Point Selection page, on the Extension Wizards tab, click Transformation Templates, click Transformation Extensions, and click Next.
  6. On the New Transformation Extension page, specify values for the following fields:
    • In the ID field, specify a unique value that identifies the transformation extension to the transformation service.
    • In the Name field, specify a name for the transformation extension.
    • In the Target transformation ID field, type the identifier for the transformation that you are extending. This identifier should follow Java naming conventions, as in this example: the.extended.transformation.
    Note: For more information about the other fields on this page and the remaining pages in the wizard, see the context-sensitive help by pressing F1 when that page is displayed in the product. If you are using the Linux platform, for more information about the other fields on this page and the remaining pages in the wizard, see the context-sensitive help by pressing Shift+F1 when that page is displayed in the product.
  7. Click Next.
  8. Optional: On the New Transformation Extension page, click Insert or Delete to define the rules, extractors, and transforms of the extension, and click Next.
  9. Optional: On the next New Transformation Extension page, associate the rules, transforms, or extractors in the extension to the transforms or transformation that you are extending, and click Next.
    • In the Extended transforms table, specify the transformation or transforms that the transformation extension extends.
    • In the Additions to selected extended transforms table, specify the rules, transforms, and extractors for the transformation or transforms in the Extended transforms table.
      Note: The Transform ID field applies only to extractors. If you add an extractor to this table, you must specify the identifier of the transform that the extractor invokes after it extracts data from the element in the source model.
    After you specify the extended transformation and transforms, and the elements that they contain, when you click an item in the Extended transforms table, the rules, transforms, and extractors associated with that item are displayed in the Additions to selected extended transforms table.
  10. Optional: On the next New Transformation Extension page, define the properties of the transformation extension, and click Next.
  11. Click Finish.

Results

After you complete the pages in the wizard, a plugin.xml file is generated that contains an extension point named com.ibm.xtools.transform.core.transformationExtensions. This extension point contains a TransformationExtension element that defines a transformation extension. The targetTransformation attribute in the TransformationExtension element specifies the name of the transformation to extend.
Note: Some information, such as links to Eclipse documentation or to developer guides, is available only from the help topics that are installed with the product.

Feedback