You can create a transformation extension to validate the properties
of a transformation extension or a target transform. The core transformation
functionality does not distinguish between the properties of a transformation
extension and the properties of the target transform.
Before you begin
The target transform must be registered with the transformation service.
The transformation extension that extends the target transform must contain
the properties to validate.
About this task
You can create a transformation extension that validates the properties,
or you can add a TransformationExtension element to an existing transformation
extension.
To enable the validation of properties in a target transform
and transformation extension:
Procedure
- Optional: Create an Eclipse plug-in project.
- In the META-INF folder of the plug-in project, double-click the MANIFEST.MF file.
- In the manifest file editor, on the Dependencies tab,
in the Required Plug-ins area, add the following dependency:
com.ibm.xtools.transform.core.
- If a TransformationExtension element does not exist, in the manifest
editor, on the Extensions tab, in the All
Extensions area, add a com.ibm.xtools.transform.core.transformationExtensions
extension point.
- On the Extensions tab, in the All
Extensions area, click a TransformationExtension element.
- Click helperClass.
- In the New Java Class window, in the Name field,
specify a name for the class.
- Click Finish. The Java
file editor displays the new class.
- Specify the Java code to override the validateContext() method.
For more information about this method, which is contained in the class named
com.ibm.xtools.transform.core.extension.AbstractTransformExtensionHelper,
see the Rational® Developer
Guide.
- Click .
Results
The validation code is invoked the next time that the target transform
and the transformation extension run.