Skip navigation links

Package com.ibm.xtools.transform.ui

This package provides API for customizing the UI of transformations registered with the Transformation Service.

See: Description

Package com.ibm.xtools.transform.ui Description

This package provides API for customizing the UI of transformations registered with the Transformation Service.

Package Specification

The Transformation Service provides a generic UI for running registered transformations. Only "public" transformations can be run via this UI.

To run a transformation the user must first create a transformation configuration using the new transformation configuration wizard. The data associated with a transformation configuration is presented to the user in a set of pages. These pages also appear in the transformation configuration editor as tabs. There are several default tabs associated with every transformation:

The API defined in this package enables the transformation author to add custom tabs for a transformation configuration and to override the default tabs if desired. In addition, the author also has the ability to perform additional filtering of available objects to be shown for the source and target selection panes.

Enabling Custom Transformation UI

Before a transformation author can customize the UI for a transformation, he must first inform the Transformation Service. This is easily accomplished by doing the following:

  1. Create a class that is derived from AbstractTransformGUI and override the appropriate methods, such as getConfigurationTabs().
  2. In the transformation descriptor in XML, add the transformGUI attribute where the value is the fully qualified class created above.

Transformation extension authors can also contribute tabs in a similar way. The class must be derived from AbstractExtensionGUI and the XML attribute to set is extensionGUI.

Adding New Configuration Tabs

The AbstractTransformGUI method getConfigurationTabs() returns an array of configuration tabs to be displayed when a configuration for the associated transformation is selected. This list should include the three default tabs, where the Target tab usually comes first and the Common tab comes last. Instances of these default tabs can be easily obtained by calling the appropriate static methods defined by AbstractTransformGUI. For example, the default Target tab is obtained by calling createUML2TargetContainerTab().

Each custom tab should be derived from AbstractTransformConfigTab and be in the middle of the configuration tab list returned by getConfigurationTabs(). There are two key methods of this class that must be implemented:

Filtering Displayed Source and Target Objects

Although the source and target model types defined in the transformation descriptor enable the UI to filter the available source and target objects for the transformation, the author may wish to provide additional pruning of the selection tree. There are two methods in AbstractTransformGUI for deciding if an object is to be displayed in the corresponding selection tree:

Handling transformation configurations being saved

The handleEditorSave(com.ibm.xtools.transform.core.config.ITransformConfig) method provides a way for transformations to perform additional actions after a transformation configuration has been saved in the transformation configuration editor.

Skip navigation links