Pattern Extensions

Once a pattern has been exported to a patzip file, the patzip file can be copied to a user's external pattern directory (see Using Exported Patterns) and be used in subsequent generator invocations. If the pattern is to be used by tooling that extend and reuse the generator, the patzip file can be deployed in the tool's plugin directory along with the tool's jar file, plugin.xml and other runtime files.

In order for the generator to find the patzip, the plugin must provide an extension to the generator to indicate where the patzip file can be found. In the plugin.xml, you should add the following xml.

   <extension point="com.ibm.dptk.patternPlugin">

        <pattern  type="appdef"  patzip=""  />

   </extension>

The type attribute is ignored, but future releases will treat that value as the type of files for which this pattern is applicable. The patzip attribute is the name of the patzip file relative to the root of the tools plugin directory. For example, if you place myPattern.patzip in the same directory as the plugin's plugin.xml, the attribute value would be "myPattern.patzip".


© Copyright IBM Corporation 2000, 2005. All Rights Reserved.