metaonly module xdc.tools.product.plugingen.Main

Command implementation

The plugingen tool allows RTSC content producers to create eclipse plugins that allows their content to be integrated in the CCS environment. As input, the tool requires [ more ... ]
Configuration settings sourced in xdc/tools/product/plugingen/Main.xdc
var Main = xdc.useModule('xdc.tools.product.plugingen.Main');
module-wide config parameters
        '[-p product_root_directory]',
        ' -m module',
        '[-o outdir]',
        '[-f pluginFragment]'
    ];
module-wide functions
    Main.exec// xs script entry point(Any args) returns Any
    Main.main// xs shell entry point(Any args) returns Any
per-instance config parameters
    var params = new Main.Params// Instance config-params object;
        params.generationFormat// Plugin generation format = String null;
        params.pluginFragment// Text file containing plugin fragment = String null;
        params.productDir// Product root directory = String "./";
        params.productModule// Input description of the plug-in to be specified = String undefined;
per-instance functions
    inst.run// Underlying implementation of the command(Cmdr.Instance cmdr, String[] args) returns Any
 
DETAILS
The plugingen tool allows RTSC content producers to create eclipse plugins that allows their content to be integrated in the CCS environment. As input, the tool requires
Refer to ExampleProduct for an implementation of IProduct.
The tool may also be used to generate starter examples that will showup in the new project wizard. This is accomplished by implementing IProductTemplate and setting the templateModule configuration parameter of the IProduct implementation to the name of the implementation module. Refer to Examples for a sample implementation of IProductTemplate.
The XGCONF product view maybe developed by implementing IProductView and setting the productViewModule configuration parameter of the IProduct implementation to the name of the implementation module. Refer to ProductView.xdc and ProductView.xs for a sample implementation of IProductView.
The tool operates on a product that is either specified by the -p option or is present in the folder from which the tool is executed. The tool will create the plugin in a sub-folder named eclipse in the output directory specified with -o option. If the -o option is not specified the plugin is created in the product root directory.
EXAMPLE
      xs xdc.tools.product.plugingen 
                      -p exampleprod_1_0_0_00
                      -m xdc.tools.product.plugingen.examples.ExampleProduct
 
config Main.usage  // module-wide

Usage for this command

Configuration settings
Main.usage = String[] [
    '[-p product_root_directory]',
    ' -m module',
    '[-o outdir]',
    '[-f pluginFragment]'
];
 
 
Main.exec()  // module-wide

xs script entry point

Configuration settings
Main.exec(Any args) returns Any
 
DETAILS
This function is called from within other XDCscript scripts and performs the same operations as main() except that, rather than output the return value of inst.run(), this value is simply returned to the caller of exec().
 
Main.main()  // module-wide

xs shell entry point

Configuration settings
Main.main(Any args) returns Any
 
DETAILS
This function
  • creates a no-arg instance, inst, of the module inheriting this interface;
  • parses command line arguments placing all options in the config params of the inheriting module;
  • creates a xdc.tools.Cmdr instance, cmdr;
  • calls inst.run() with the cmdr and any command line command line arguments not parsed as options; and
  • outputs the return result from inst.run()
Instance Config Parameters

Configuration settings
var params = new Main.Params;
// Instance config-params object
    params.generationFormat = String null;
    // Plugin generation format
    params.outputDir = String null;
    // Output directory in which the plugin will be generated
    params.pluginFragment = String null;
    // Text file containing plugin fragment
    params.productDir = String "./";
    // Product root directory
    params.productModule = String undefined;
    // Input description of the plug-in to be specified
    params.suppressProductTypeInfo = Bool false;
    // This Option is now removed from PluginGen. We shall throw an error to flag this change to users
 
config Main.Params.generationFormat  // instance

Plugin generation format

Configuration settings
var params = new Main.Params;
  ...
params.generationFormat = String null;
 
 
config Main.Params.outputDir  // instance

Output directory in which the plugin will be generated

Configuration settings
var params = new Main.Params;
  ...
params.outputDir = String null;
 
DETAILS
This option names the directory in which the plugin will be generated in a sub-directory named eclipse. If this option is not specified the tool will generate the plugin in the product root directory specified with the '-p' option.
 
config Main.Params.pluginFragment  // instance

Text file containing plugin fragment

Configuration settings
var params = new Main.Params;
  ...
params.pluginFragment = String null;
 
DETAILS
This option names the text file containing a plugin fragment. This allows users to contribute extensions to the UI plugins generated by the tool.
The tool does not perform syntax checking of the contributed fragment. Users need to ensure the correctness of the contributed fragment. Note that syntactically incorrect fragments can disable the plugin completely in the eclipse platform.
 
config Main.Params.productDir  // instance

Product root directory

Configuration settings
var params = new Main.Params;
  ...
params.productDir = String "./";
 
DETAILS
This option names the product root directory that is used by the tool to generate the plugin. For example, its declared repositories are added to the package path and are searched for contributed platforms.
If the '-o' option is not specified, the tool generates the plugin in a sub-directory named eclipse in the product root directory.
If this option is not specified, the product root directory is assumed to be ./.
 
config Main.Params.productModule  // instance

Input description of the plug-in to be specified

Configuration settings
var params = new Main.Params;
  ...
params.productModule = String undefined;
 
DETAILS
This required option names a module that implements xdc.tools.product.IProduct.
 
config Main.Params.suppressProductTypeInfo  // instance

This Option is now removed from PluginGen. We shall throw an error to flag this change to users

Configuration settings
var params = new Main.Params;
  ...
params.suppressProductTypeInfo = Bool false;
 
DETAILS
Suppress generation of product type information
This option generates eclipse plugin without the product type information. Should only be invoked to generate plugins whose product type information was hard coded into CCS 4.x prior to the creation of this tool.
This option should not be used by _any_ new products.
 
Main.run()  // instance

Underlying implementation of the command

Configuration settings
inst.run(Cmdr.Instance cmdr, String[] args) returns Any
 
DETAILS
Since this method is used to support both command line tools and other XDCscript scripts, it is important to avoid explicit termination of the JVM via java.lang.System.exit(); doing so precludes callers from handling failures.
Implementations should instead call
generated on Wed, 09 Aug 2017 16:38:22 GMT