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 * Refer to {@link ./doc-files/ExampleProduct.xdc ExampleProduct}
17 * for an implementation of {@link xdc.tools.product.IProduct IProduct}.
18 *
19 * The tool may also be used to generate starter examples that will showup
20 * in the new project wizard. This is accomplished by implementing
21 * {@link xdc.tools.product.IProductTemplate IProductTemplate} and setting
22 * the {@link xdc.tools.product.IProduct#templateModule templateModule}
23 * configuration parameter of the {@link xdc.tools.product.IProduct IProduct}
24 * implementation to the name of the implementation module.
25 * Refer to {@link ./doc-files/Examples.xdc Examples}
26 * for a sample implementation of {@link 27 * xdc.tools.product.IProductTemplate IProductTemplate}.
28 *
29 * The XGCONF product view maybe developed by implementing
30 * {@link xdc.tools.product.IProductView IProductView} and setting
31 * the {@link xdc.tools.product.IProduct#productViewModule productViewModule}
32 * configuration parameter of the {@link xdc.tools.product.IProduct IProduct}
33 * implementation to the name of the implementation module.
34 * Refer to {@link ./doc-files/ProductView.xdc ProductView.xdc} and
35 * {@link ./doc-files/ProductView.xs ProductView.xs}
36 * for a sample implementation of {@link 37 * xdc.tools.product.IProductView IProductView}.
38 *
39 * The tool operates on a product that is either specified by the `-p`
40 * option or is present in the folder from which the tool is executed.
41 * The tool will create the plugin in a sub-folder named `eclipse`
42 * in the output directory specified with `-o` option. If the `-o`
43 * option is not specified the plugin is created in the product root
44 * directory.
45 * The tool will search the repositories specified in the module
46 * implementing {@link xdc.tools.product.IProduct} for RTSC platforms.
47 * This search can be disabled by specifying the`--disable_repo_search`
48 * option. The user needs to ensure that the repositories are installed
49 * in the product root directory before using the tool.
50 *
51 *
52 *
53 * @a(Example) 54 * @p(code) 55 * xs xdc.tools.product.plugingen
56 * -p exampleprod_1_0_0_00
57 * -m xdc.tools.product.plugingen.examples.ExampleProduct
58 59 *
60 */
61 metaonlymodule Main inherits xdc.tools.ICmd
62 {
63 overrideconfig String usage[] = [
64 '[-p product_root_directory]',
65 ' -m module',
66 '[-o outdir]',
67 '[--suppress_product_type_info]',
68 '[--disable_repo_search]'
69 ];
70
71 instance:
72
73 /*!
74 * ======== productDir ========
75 * Product root directory
76 *
77 * This option names the product root directory that is used by the
78 * tool to generate the plugin. If the '-o' option is not
79 * specified the tool generates the plugin in a sub-directory
80 * called `eclipse` in the product root directory.
81 *
82 */
83 @CommandOption("p")
84 config String productDir = "./";
85
86 /*!
87 * ======== schemaFile ========
88 * Input description of the plug-in to be specified
89 *
90 * This required option names a module that implements
91 * `{@link xdc.tools.product.IProduct}`.
92 *
93 */
94 @CommandOption("m")
95 config String productModule;
96
97 /*!
98 * ======== outputDir ========
99 * Output directory in which the plugin will be generated.
100 *
101 * This option names the directory in which the plugin
102 * will be generated in a sub-directory named `eclipse`.
103 * If this option is not specified the tool will generate
104 * the plugin in the product root directory specified with
105 * the '-p' option.
106 *
107 */
108 @CommandOption("o")
109 config String outputDir = null;
110
111 /*!
112 * ======== suppress_product_type_info ========
113 * Suppress generation of product type information in the
114 * generated plugin
115 *
116 * This option generates eclipse plugin without the product
117 * type information. Should be invoked to generate plugins whose
118 * product type is declared elsewhere
119 *
120 */
121 @CommandOption("suppress_product_type_info")
122 config Bool suppressProductTypeInfo = false;
123
124
125 /*!
126 * ======== disable_repo_search ========
127 * Suppress search of product repositories
128 *
129 * If this option is specified the tool does not
130 * search the product repositories for RTSC platforms.
131 */
132 @CommandOption("disable_repo_search")
133 config Bool suppressSearch = false;
134
135
136 /*!
137 * ======== run ========
138 */
139 override Any run(xdc.tools.Cmdr.Instance cmdr, String args[]);
140 }
141 /*
142 * @(#) xdc.tools.product.plugingen; 1, 0, 0,37; 8-17-2010 16:39:28; /db/ztree/library/trees/xdctools/xdctools-d43x/src/
143 */
144