aboutsummaryrefslogtreecommitdiffstats
path: root/tools/eclipse/config_wizard/plugin.xml
blob: e2163c8fb5bea1448e1bdf043a21b0de3f402340 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <!-- Configuration Wizard. -->
   <extension
         point="org.eclipse.ui.newWizards">
      <category
            id="org.chibios.tools.eclipse.config"
            name="ChibiOS/RT">
      </category>
      <wizard
            category="org.chibios.tools.eclipse.config"
            class="org.chibios.tools.eclipse.config.wizards.ConfigurationNewWizard"
            icon="icons/chibios.gif"
            id="org.chibios.tools.eclipse.config.wizards.ConfigurationNewWizard"
            name="ChibiOS/RT Configuration Wizard">
      </wizard>
   </extension>

   <!-- Registers the file extension .chxml as an XML type. -->
   <extension point="org.eclipse.core.contenttype.contentTypes">
      <file-association
            content-type="org.eclipse.core.runtime.xml"
            file-extensions="chxml">
      </file-association>
   </extension>

   <!-- Commands. -->
   <extension
         point="org.eclipse.ui.commands">
      <category
            id="org.chibios.tools.eclipse.config.commands.category"
            name="ChibiOS/RT Configuration Category">
      </category>
      <!-- Generate Files command. -->
      <command
            categoryId="org.chibios.tools.eclipse.config.commands.category"
            id="org.chibios.tools.eclipse.config.commands.generateFiles"
            name="Generate Files from Configuration Data">
      </command>
      <!-- Check Configuration Data command. -->
      <command
            categoryId="org.chibios.tools.eclipse.config.commands.category"
            id="org.chibios.tools.eclipse.config.commands.checkDescription"
            name="Check Configuration Data">
      </command>
   </extension>

   <!-- Handlers. -->
   <extension
         point="org.eclipse.ui.handlers">
      <!-- Generate Files handler. -->
      <handler
            class="org.chibios.tools.eclipse.config.handlers.GenerateFiles"
            commandId="org.chibios.tools.eclipse.config.commands.generateFiles">
      </handler>
      <!-- Check Configuration Data handler. -->
      <handler
            class="org.chibios.tools.eclipse.config.handlers.CheckDescription"
            commandId="org.chibios.tools.eclipse.config.commands.checkDescription">
      </handler>
   </extension>

   <!-- Configuration menu and toolbar. -->
   <extension
         point="org.eclipse.ui.menus">
      <menuContribution
            locationURI="menu:org.eclipse.ui.main.menu?after=additions">
         <menu
               id="org.chibios.tools.eclipse.config.menus.configurationMenu"
               label="Configuration"
               mnemonic="M">
            <visibleWhen
                  checkEnabled="false">
               <with
                     variable="selection">
                  <count
                        value="1">
                  </count>
                  <iterate
                        ifEmpty="false"
                        operator="and">
                     <adapt
                           type="org.eclipse.core.resources.IResource">
                        <test
                              property="org.eclipse.core.resources.extension"
                              value="chcfg">
                        </test>
                     </adapt>
                  </iterate>
               </with>
            </visibleWhen>
            <command
                  commandId="org.chibios.tools.eclipse.config.commands.generateFiles"
                  id="org.chibios.tools.eclipse.config.menus.generateFiles"
                  mnemonic="S">
            </command>
            <command
                  commandId="org.chibios.tools.eclipse.config.commands.checkDescription"
                  id="org.chibios.tools.eclipse.config.menus.checkDescription"
                  mnemonic="S">
            </command>
         </menu>
      </menuContribution>
      <menuContribution
            locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
         <toolbar
               id="org.chibios.tools.eclipse.config.toolbars.sampleToolbar">
            <command
                  commandId="org.chibios.tools.eclipse.config.commands.generateFiles"
                  icon="icons/generate.gif"
                  id="org.chibios.tools.eclipse.config.toolbars.generateFiles"
                  tooltip="Generate Files from Configuration Data">
               <visibleWhen
                     checkEnabled="false">
                  <with
                        variable="selection">
                     <count
                           value="1">
                     </count>
                     <iterate
                           ifEmpty="false"
                           operator="and">
                        <adapt
                              type="org.eclipse.core.resources.IResource">
                           <test
                                 property="org.eclipse.core.resources.extension"
                                 value="chcfg">
                           </test>
                        </adapt>
                     </iterate>
                  </with>
               </visibleWhen>
            </command>
            <command
                  commandId="org.chibios.tools.eclipse.config.commands.checkDescription"
                  icon="icons/check.gif"
                  id="org.chibios.tools.eclipse.config.toolbars.checkDescription"
                  tooltip="Check Configuration Data without generating Files">
               <visibleWhen
                     checkEnabled="false">
                  <with
                        variable="selection">
                     <count
                           value="1">
                     </count>
                     <iterate
                           ifEmpty="false"
                           operator="and">
                        <adapt
                              type="org.eclipse.core.resources.IResource">
                           <test
                                 property="org.eclipse.core.resources.extension"
                                 value="chcfg">
                           </test>
                        </adapt>
                     </iterate>
                  </with>
               </visibleWhen>
            </command>
         </toolbar>
      </menuContribution>
   </extension>

</plugin>