metaonly module xdc.tools.product.trexgen.Main |
 |
Command implementation
The
trexgen tool allows RTSC content producers to
create projectspec files that allow their content to be
integrated in the CCS Resource Explorer environment. As input,
the tool requires
[
more ... ]
var Main = xdc.useModule('xdc.tools.product.trexgen.Main');
module-wide config parameters
'[-p product_root_directory]',
' -m module',
'[-o outdir]'
];
module-wide functions
per-instance config parameters
per-instance functions
DETAILS
The trexgen tool allows RTSC content producers to
create projectspec files that allow their content to be
integrated in the CCS Resource Explorer environment. As input,
the tool requires
Refer to
ExampleProduct
for an implementation of
IProduct.
The tool generates starter examples that will show up
in the Resource explorer. 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 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 resources sub-folder in the output directory
specified with -o option. If the -o
option is not specified the resources is created in the product root
directory.
The tool will search the repositories specified in the module
implementing
xdc.tools.product.IProduct for RTSC platforms.
This search can be disabled by specifying the
--disable_repo_search
option. The user needs to ensure that the repositories are installed
in the product root directory before using the tool.
EXAMPLE
xs xdc.tools.product.trexgen
-p exampleprod_1_0_0_00
-m xdc.tools.product.plugingen.examples.ExampleProduct
config Main.usage // module-wide |
 |
Usage for this command
Main.usage = String[] [
'[-p product_root_directory]',
' -m module',
'[-o outdir]'
];
Main.exec() // module-wide |
 |
xs script entry point
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
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 |
 |
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.productDir = String "./";
// Product root directory
params.productModule = String undefined;
// Input description of the plug-in to be specified
config Main.Params.generationFormat // instance |
 |
Plugin generation format
var params = new Main.Params;
...
params.generationFormat = String null;
config Main.Params.outputDir // instance |
 |
Output directory in which the plugin will be generated
var params = new Main.Params;
...
params.outputDir = String null;
DETAILS
This option names the directory in which the project spec
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.productDir // instance |
 |
Product root directory
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 projectspec files. For example, it's 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 resources
directory 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
var params = new Main.Params;
...
params.productModule = String undefined;
DETAILS
This required option names a module that implements
xdc.tools.product.IProduct.
Main.run() // instance |
 |
Underlying implementation of the command
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:23 GMT