1 /*
2 * Copyright 2010 by Texas Instruments Incorporated.
3 *
4 */
5
6 /*!
7 * ======== Main ========
8 * Command-line tool for generating eclipse plugins for RTSC content
9 *
10 * The `plugingen` tool allows RTSC content producers to
11 * create eclipse plugins that allows their content to be
12 * integrated in the CCS4 environment. As input, the tool requires
13 * @p(blist) 14 * - a RTSC module implementing {@link xdc.tools.product.IProduct}
15 * @p 16 * The tool operates on a product that is either specified by the `-p`
17 * option or is present in the folder from which the tool is executed.
18 * The tool will create the plugin in a sub-folder called `eclipse`
19 * in the output directory specified with `-o` option. If the `-o`
20 * option is not specified the plugin is created in the product root
21 * directory.
22 * The tool will search the repositories specified in the module
23 * implementing {@link xdc.tools.product.IProduct} for RTSC platforms.
24 * This search can be disabled by specifying the`--disable_repo_search`
25 * option. The user needs to ensure that the repositories are installed
26 * in the product root directory before using the tool.
27 *
28 *
29 *
30 * @a(Example) 31 * @p(code) 32 * xs xdc.tools.product.plugingen
33 * -p exampleprod_1_0_0_00
34 * -m xdc.tools.product.plugingen.examples.ExampleProduct
35 *
36 */
37 metaonlymodule Main inherits xdc.tools.ICmd
38 {
39 overrideconfig String usage[] = [
40 '[-p product_root_directory]',
41 ' -m module',
42 '[-o outdir]',
43 '[--suppress_product_type_info]',
44 '[--disable_repo_search]'
45 ];
46
47 instance:
48
49 /*!
50 * ======== productDir ========
51 * Product root directory
52 *
53 * This option names the product root directory that is used by the
54 * tool to generate the plugin. If the '-o' option is not
55 * specified the tool generates the plugin in a sub-directory
56 * called `eclipse` in the product root directory.
57 *
58 */
59 @CommandOption("p")
60 config String productDir = "./";
61
62 /*!
63 * ======== schemaFile ========
64 * Input description of the plug-in to be specified
65 *
66 * This required option names a module that implements
67 * `{@link xdc.tools.product.IProduct}`.
68 *
69 */
70 @CommandOption("m")
71 config String productModule;
72
73 /*!
74 * ======== outputDir ========
75 * Output directory in which the plugin will be generated.
76 *
77 * This option names the directory in which the plugin
78 * will be generated in a sub-directory named `eclipse`.
79 * If this option is not specified the tool will generate
80 * the plugin in the product root directory specified with
81 * the '-p' option.
82 *
83 */
84 @CommandOption("o")
85 config String outputDir = null;
86
87 /*!
88 * ======== suppress_product_type_info ========
89 * Suppress generation of product type information in the
90 * generated plugin
91 *
92 * This option generates eclipse plugin without the product
93 * type information. Should be invoked to generate plugins whose
94 * product type is declared elsewhere
95 *
96 */
97 @CommandOption("suppress_product_type_info")
98 config Bool suppressProductTypeInfo = false;
99
100
101 /*!
102 * ======== disable_repo_search ========
103 * Suppress search of product repositories
104 *
105 * If this option is specified the tool does not
106 * search the product repositories for RTSC platforms.
107 */
108 @CommandOption("disable_repo_search")
109 config Bool suppressSearch = false;
110
111
112 /*!
113 * ======== run ========
114 */
115 override Any run(xdc.tools.Cmdr.Instance cmdr, String args[]);
116 }
117 /*
118 * @(#) xdc.tools.product.plugingen; 1, 0, 0,29; 6-19-2010 20:05:12; /db/ztree/library/trees/xdctools/xdctools-d36x/src/
119 */
120