Parameters
Previous  Top  Next

A runner is expected to require some number of parameters to help it decide what data to output in its XML data file.

For example, the runner for com.headway.examples.xsl needs to be told the location of the root directory containing the XSL files to be parsed. The runner for com.headway.examples.osgi also expects a directory argument - telling it where to find its OSGi bundles - and additionally provides a boolean option whether or not to include Eclipse extensions in the model.

It follows that, in order for Structure101g to invoke the runner directly, it first needs to ask the user to supply appropriate values for these arguments.

This is defined via the params section of runner.xml. Here is what it looks like for com.headway.examples.osgi:

<
params>
   <
param key="dir" name="Bundles directory" type="file" mode="dirOnly" required="true">
      <
description>
         Identifies a single directory containing all the OSGi bundles you 
         wish to model, e.g. c:\eclipse\plugins
      <
/description>
   <
/param>
   <
param key="eclipse" name="Include Eclipse extensions" type="boolean" default="false">
      <
description>
         Switch this on to include Eclipse extensions (extensions and extension 
         points) in the model
      <
/description>
   <
/param>
<
/params>

This states that the user needs to supply two parameter values: dir and eclipse.

For an example of all the different param types supported, check out the com.headway.examples.params runner in the example flavors.

Assuming legal values have been collected (here a valid directory path for dir), the user will be able to execute the runner.