Revision 1141 tmp/org.txm.index.rcp/plugin.xml

plugin.xml (revision 1141)
25 25
                  checkEnabled="false">
26 26
               <or>
27 27
                  <reference
28
                        definitionId="OnePartitionSelected">
28
                        definitionId="OneCorpusSelected">
29 29
                  </reference>
30
               </or>
31
            </visibleWhen>
32
         </command>
33
         <command
34
               commandId="org.txm.index.rcp.handlers.ComputePartitionIndex"
35
               icon="icons/partitionindex.png"
36
               style="push">
37
            <visibleWhen
38
                  checkEnabled="false">
39
               <or>
30 40
                  <reference
31
                        definitionId="OneCorpusSelected">
41
                        definitionId="OnePartitionSelected">
32 42
                  </reference>
33 43
               </or>
34 44
            </visibleWhen>
......
55 65
                  checkEnabled="false">
56 66
               <or>
57 67
                  <reference
58
                        definitionId="OnePartitionSelected">
68
                        definitionId="OneCorpusSelected">
59 69
                  </reference>
70
               </or>
71
            </visibleWhen>
72
         </command>
73
         <command
74
               commandId="org.txm.index.rcp.handlers.ComputePartitionIndex"
75
               icon="icons/partitionindex.png"
76
               style="push">
77
            <visibleWhen
78
                  checkEnabled="false">
79
               <or>
60 80
                  <reference
61
                        definitionId="OneCorpusSelected">
81
                        definitionId="OnePartitionSelected">
62 82
                  </reference>
63 83
               </or>
64 84
            </visibleWhen>
......
92 112
               </or>
93 113
            </visibleWhen>
94 114
         </command>
95
      </menuContribution>
96
      <menuContribution
97
            allPopups="false"
98
            locationURI="toolbar:org.txm.rcp.toolbartools?after=ComputeLexicalTableFromPartition">
99 115
         <command
100
               commandId="org.txm.index.rcp.handlers.ComputeIndex"
101
               icon="icons/index.png"
102
               id="ComputeIndexFromPartition"
103
               style="push"
104
               tooltip="%command.tooltip">
116
               commandId="org.txm.index.rcp.handlers.ComputePartitionIndex"
117
               icon="icons/partitionindex.png"
118
               style="push">
105 119
            <visibleWhen
106 120
                  checkEnabled="false">
107 121
               <or>
......
163 177
            id="org.txm.index.rcp.editors.DictionnaryEditor"
164 178
            name="%editor.name.0">
165 179
      </editor>
180
      <editor
181
            class="org.txm.index.rcp.editors.PartitionIndexEditor"
182
            default="false"
183
            icon="icons/partitionindex.png"
184
            id="org.txm.index.rcp.editors.PartitionIndexEditor"
185
            name="PartitionIndex">
186
      </editor>
166 187
   </extension>
167 188
   <extension
168 189
         point="org.eclipse.core.runtime.adapters">
......
186 207
               type="org.eclipse.ui.model.IWorkbenchAdapter2">
187 208
         </adapter>
188 209
      </factory>
210
      <factory
211
            adaptableType="org.txm.index.core.functions.PartitionIndex"
212
            class="org.txm.index.rcp.adapters.PartitionIndexAdapterFactory">
213
         <adapter
214
               type="org.eclipse.ui.model.IWorkbenchAdapter">
215
         </adapter>
216
         <adapter
217
               type="org.eclipse.ui.model.IWorkbenchAdapter2">
218
         </adapter>
219
      </factory>
189 220
   </extension>
190 221
   <extension
191 222
         point="org.eclipse.ui.commands">
......
209 240
            id="org.txm.synopticedition.rcp.commands.link.IndexToLexicalTable"
210 241
            name="%command.name.43">
211 242
      </command>
243
      <command
244
            categoryId="org.txm.rcp.category.txm"
245
            defaultHandler="org.txm.index.rcp.handlers.ComputePartitionIndex"
246
            id="org.txm.index.rcp.handlers.ComputePartitionIndex"
247
            name="PartitionIndex"
248
            returnTypeId="org.txm.index.core.functions.PartitionIndex">
249
      </command>
212 250
      
213 251
      
214 252
   </extension>
......
246 284
               variable="activePart">
247 285
            <instanceof
248 286
                  value="org.txm.index.rcp.editors.IndexEditor">
287
       
288
      <definition
289
            id="PartitionIndexEditorActive">
290
         <with
291
               variable="activePart">
292
            <instanceof
293
                  value="org.txm.index.rcp.editors.IndexEditor">
249 294
            </instanceof>
250 295
         </with>
251 296
      </definition>
252 297
      <definition
298
            id="OnePartitionIndexSelected">
299
         <with
300
               variable="selection">
301
            <iterate
302
                  ifEmpty="false"
303
                  operator="and">
304
               <instanceof
305
                     value="org.txm.index.core.functions.Index">
306
               </instanceof>
307
            </iterate>
308
         </with>
309
      </definition>     </instanceof>
310
         </with>
311
      </definition>
312
      <definition
253 313
            id="LexiconEditorActive">
254 314
         <with
255 315
               variable="activePart">
......
258 318
            </instanceof>
259 319
         </with>
260 320
      </definition>
321
      <definition
322
            id="PartitionIndexEditorActive">
323
         <with
324
               variable="activePart">
325
            <instanceof
326
                  value="org.txm.index.rcp.editors.IndexEditor">
327
               <definition
328
                     id="PartitionIndexEditorActive">
329
                  <with
330
                        variable="activePart">
331
                     <instanceof
332
                           value="org.txm.index.rcp.editors.IndexEditor">
333
                     </instanceof>
334
                  </with>
335
               </definition>
336
               <definition
337
                     id="OnePartitionIndexSelected">
338
                  <with
339
                        variable="selection">
340
                     <iterate
341
                           ifEmpty="false"
342
                           operator="and">
343
                        <instanceof
344
                              value="org.txm.index.core.functions.Index">
345
                        </instanceof>
346
                     </iterate>
347
                  </with>
348
               </definition>
349
            </instanceof>
350
         </with>
351
      </definition>
352
      <definition
353
            id="OnePartitionIndexSelected">
354
         <with
355
               variable="selection">
356
            <iterate
357
                  ifEmpty="false"
358
                  operator="and">
359
               <instanceof
360
                     value="org.txm.index.core.functions.PartitionIndex">
361
               </instanceof>
362
            </iterate>
363
         </with>
364
      </definition>
261 365
   </extension>
262 366
   <extension
263 367
         point="org.txm.statengine.r.rcp.sendtor">
......
339 443
            class="org.txm.index.rcp.handlers.SendIndexTo"
340 444
            commandId="org.txm.index.rcp.handlers.ComputeIndex">
341 445
         <activeWhen>
342
         <and>
446
            <and>
343 447
               <reference
344 448
                     definitionId="LexiconEditorActive">
345 449
               </reference>
346 450
               <reference
347 451
                     definitionId="SendSelectionContextNotActive">
348 452
               </reference>
349
               </and>
453
            </and>
350 454
         </activeWhen>
351 455
      </handler>
352 456
   </extension>

Also available in: Unified diff