genParm

Writes out a parameter passed in by the tool that invoked the pattern.

This tag is commonly used to access information about the input, or "appdef", file. The Apply Pattern action will pass resource type-specific arguments into the pattern:

If the pattern is applied to a single file, DPTK will pass information about that file into the pattern as arguments: its containing project ("com.ibm.dptk.rsrc.project"), full name ("com.ibm.dptk.rsrc.name"), full path ("com.ibm.dptk.rsrc.fullPath"), containing folder name ("com.ibm.dptk.rsrc.parent"), containing folder path("com.ibm.dptk.rsrc.parentPath"), relative path ("com.ibm.dptk.rsrc.relativePath"), file system location ("com.ibm.dptk.rsrc.rawLocation"), file name ("com.ibm.dptk.rsrc.filename") and extension ("com.ibm.dptk.rsrc.filetype").

If the pattern is applied to a single folder, DPTK will pass information about that folder into the pattern as arguments: its name ("com.ibm.dptk.rsrc.name"), full path ("com.ibm.dptk.rsrc.fullpath") and location ("com.ibm.dptk.rsrc.location").

If the pattern is applied to a single project, DPTK will pass the project name into the pattern as an argument ("com.ibm.dptk.rsrc.name")

If the pattern is applied to more than one Eclipse resource, DPTK will build a model containing the above information for each of the selected resources and make that model available to the pattern as the primary input mode.

This tag can also be used by a pattern author who needs to pass pattern-specific arguments into a pattern without having to encode them into the model. An Eclipse tool would have to be written to gather those arguments, usually with a GUI, and pass them in to DPTK when invoking the DPTK API.


Tag Summary
 
required <genParm key="value" />
 
full tag <genParm key="value" />

Required Attributes
 
key The key (e.g. "com.ibm.dptk.rsrc.name") associated with the desired argument.

There are no optional attributes
 

Example
 
<genParm
        key="com.ibm.dptk.rsrc.parentPath" />

This tag writes the project relative path of the folder containing the file against which this pattern is being applied. This value is useful if you want to generate a file in the same folder as the source file.


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