Resolves #2403
[taxeditor.git] / eu.etaxonomy.taxeditor.navigation / plugin.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <?eclipse version="3.2"?>
3 <plugin>
4 <extension
5 id="application"
6 point="org.eclipse.core.runtime.applications">
7 <application>
8 <run
9 class="eu.etaxonomy.taxeditor.navigation.Application">
10 </run>
11 </application>
12 </extension>
13 <extension
14 point="org.eclipse.ui.views">
15 <view
16 allowMultiple="true"
17 class="eu.etaxonomy.taxeditor.navigation.search.SearchResultView"
18 icon="icons/system-search.png"
19 id="eu.etaxonomy.taxeditor.navigation.search.searchResultView"
20 name="Search Result"
21 restorable="false">
22 </view>
23 <view
24 allowMultiple="false"
25 class="eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator"
26 icon="icons/preferences-system-windows.png"
27 id="eu.etaxonomy.taxeditor.navigation.navigator"
28 name="Taxon Navigator"
29 restorable="true">
30 </view>
31 <view
32 allowMultiple="false"
33 class="eu.etaxonomy.taxeditor.navigation.key.polytomous.PolytomousKeyViewPart"
34 id="eu.etaxonomy.taxeditor.navigation.key.polytomous.polytomousKeyViewPart"
35 name="Polytomous Keys"
36 restorable="true">
37 </view>
38 </extension>
39 <extension
40 point="org.eclipse.ui.menus">
41 <menuContribution
42 locationURI="menu:org.eclipse.ui.main.menu.file">
43 <separator
44 name="eu.etaxonomy.taxeditor.navigation.recentnames.separator"
45 visible="true">
46 </separator>
47 <dynamic
48 class="eu.etaxonomy.taxeditor.navigation.RecentNamesContributionItem"
49 id="eu.etaxonomy.taxeditor.navigation.recentnames">
50 </dynamic>
51 </menuContribution>
52 <menuContribution
53 locationURI="menu:eu.etaxonomy.taxeditor.menu.showView">
54 <command
55 commandId="org.eclipse.ui.views.showView"
56 label="Taxon Navigator"
57 style="push">
58 <parameter
59 name="org.eclipse.ui.views.showView.viewId"
60 value="eu.etaxonomy.taxeditor.navigation.navigator">
61 </parameter>
62 </command>
63 <command
64 commandId="org.eclipse.ui.views.showView"
65 label="Polytomous Keys"
66 style="push">
67 <parameter
68 name="org.eclipse.ui.views.showView.viewId"
69 value="eu.etaxonomy.taxeditor.navigation.key.polytomous.polytomousKeyViewPart">
70 </parameter>
71 </command>
72 </menuContribution>
73 <menuContribution
74 locationURI="popup:eu.etaxonomy.taxeditor.navigation.search.searchResultView">
75 <command
76 commandId="eu.etaxonomy.taxeditor.navigation.command.editTaxon"
77 label="Edit"
78 style="push">
79 </command>
80 </menuContribution>
81 <menuContribution
82 locationURI="popup:eu.etaxonomy.taxeditor.navigation.navigatorpopup">
83 <menu
84 id="eu.etaxonomy.navigation.menu.new"
85 label="New">
86 <command
87 commandId="eu.etaxonomy.taxeditor.navigation.newTaxonNode"
88 label="Taxon"
89 style="push">
90 </command>
91 <separator
92 name="eu.etaxonomy.navigation.menu.new.separator1"
93 visible="true">
94 </separator>
95 <command
96 commandId="eu.etaxonomy.taxeditor.navigation.newClassification"
97 id="eu.etaxonomy.taxeditor.navigation.newClassificationHandler"
98 label="Classification"
99 style="push">
100 </command>
101 </menu>
102 <separator
103 name="taxeditor-navigation.separator1"
104 visible="true">
105 </separator>
106 <command
107 commandId="eu.etaxonomy.taxeditor.navigation.command.editSelection"
108 label="Edit"
109 style="push">
110 <visibleWhen
111 checkEnabled="true">
112 <or>
113 <reference
114 definitionId="isTaxonNode">
115 </reference>
116 <reference
117 definitionId="isTaxonomicTree">
118 </reference>
119 </or>
120 </visibleWhen>
121 </command>
122 <command
123 commandId="eu.etaxonomy.taxeditor.navigation.command.moveTaxon"
124 label="Move Taxon (with child taxa)"
125 style="push">
126 <visibleWhen
127 checkEnabled="true">
128 <reference
129 definitionId="isTaxonNode">
130 </reference>
131 </visibleWhen>
132 </command>
133 <separator
134 name="taxeditor-navigation.separator2"
135 visible="true">
136 </separator>
137 <!--command
138 commandId="eu.etaxonomy.taxeditor.navigation.command.createChildTaxon"
139 label="New Child"
140 style="push">
141 </command>
142 <command
143 commandId="eu.etaxonomy.taxeditor.navigation.command.quickCreateChildTaxon"
144 label="Quick Add Child "
145 style="push">
146 </command-->
147 <command
148 commandId="org.eclipse.ui.file.import"
149 label="Import..."
150 style="push">
151 </command>
152 <command
153 commandId="org.eclipse.ui.file.export"
154 label="Export..."
155 style="push">
156 </command>
157 <separator
158 name="taxeditor-navigation.separator4"
159 visible="true">
160 </separator>
161 <command
162 commandId="org.eclipse.ui.edit.delete"
163 label="Delete"
164 style="push">
165 <visibleWhen>
166 <not>
167 <reference
168 definitionId="isSynonymNode">
169 </reference>
170 </not>
171 </visibleWhen>
172 </command>
173 <separator
174 name="taxeditor-navigation.separator5"
175 visible="true">
176 </separator>
177 <command
178 commandId="org.eclipse.ui.file.refresh"
179 label="Refresh"
180 style="push">
181 </command>
182 </menuContribution>
183 <menuContribution
184 locationURI="toolbar:org.eclipse.ui.main.toolbar">
185 <toolbar
186 id="eu.etaxonomy.taxeditor.navigation.search.toolbar">
187 <control
188 class="eu.etaxonomy.taxeditor.navigation.search.SearchBar">
189 </control>
190 </toolbar>
191 </menuContribution>
192 <menuContribution
193 locationURI="menu:eu.etaxonomy.navigation.menu.new">
194 <command
195 commandId="eu.etaxonomy.taxeditor.navigation.newTaxonNode"
196 label="Taxon"
197 style="push">
198 </command>
199 <separator
200 name="eu.etaxonomy.navigation.menu.new.separator1"
201 visible="true">
202 </separator>
203 <command
204 commandId="eu.etaxonomy.taxeditor.navigation.newClassification"
205 id="eu.etaxonomy.taxeditor.navigation.newClassificationHandler"
206 label="Classification"
207 style="push">
208 </command>
209 </menuContribution>
210 <menuContribution
211 locationURI="popup:eu.etaxonomy.taxeditor.navigation.key.polytomous.polytomousKeyViewPart">
212 <command
213 commandId="eu.etaxonomy.taxeditor.navigation.key.polytomous.edit"
214 label="Edit"
215 style="push">
216 </command>
217 <separator
218 name="eu.etaxonomy.eu.polytomousKeyView.separator"
219 visible="true">
220 </separator>
221 <command
222 commandId="org.eclipse.ui.edit.delete"
223 label="Delete"
224 style="push">
225 </command>
226 </menuContribution>
227 </extension>
228 <extension
229 point="org.eclipse.ui.commands">
230 <command
231 defaultHandler="eu.etaxonomy.taxeditor.navigation.navigator.handler.NewTaxonNodeHandler"
232 id="eu.etaxonomy.taxeditor.navigation.newTaxonNode"
233 name="New Taxon Node">
234 </command>
235 <command
236 defaultHandler="eu.etaxonomy.taxeditor.navigation.navigator.handler.NewClassificationHandler"
237 id="eu.etaxonomy.taxeditor.navigation.newClassification"
238 name="New Classification">
239 </command>
240 </extension>
241 <extension
242 point="org.eclipse.ui.commands">
243 <command
244 defaultHandler="eu.etaxonomy.taxeditor.navigation.navigator.handler.EditHandler"
245 id="eu.etaxonomy.taxeditor.navigation.command.editSelection"
246 name="Edit">
247 </command>
248 <command
249 defaultHandler="eu.etaxonomy.taxeditor.navigation.navigator.handler.MoveTaxonHandler"
250 id="eu.etaxonomy.taxeditor.navigation.command.moveTaxon"
251 name="Move Taxon">
252 </command>
253 <command
254 defaultHandler="eu.etaxonomy.taxeditor.navigation.navigator.handler.RefreshTreeHandler"
255 id="org.eclipse.ui.file.refresh"
256 name="Refresh">
257 </command>
258 </extension>
259 <extension
260 point="org.eclipse.ui.commands">
261 <command
262 defaultHandler="eu.etaxonomy.taxeditor.navigation.key.polytomous.handler.EditHandler"
263 id="eu.etaxonomy.taxeditor.navigation.key.polytomous.edit"
264 name="Edit Polytomous Key">
265 </command>
266 </extension>
267 <extension
268 point="org.eclipse.ui.handlers">
269 <handler
270 class="eu.etaxonomy.taxeditor.navigation.navigator.handler.DeleteHandler"
271 commandId="org.eclipse.ui.edit.delete">
272 <activeWhen>
273 <with
274 variable="activePartId">
275 <equals
276 value="eu.etaxonomy.taxeditor.navigation.navigator">
277 </equals>
278 </with>
279 </activeWhen>
280 </handler>
281 <handler
282 class="eu.etaxonomy.taxeditor.navigation.key.polytomous.handler.DeleteHandler"
283 commandId="org.eclipse.ui.edit.delete">
284 <activeWhen>
285 <with
286 variable="activePartId">
287 <equals
288 value="eu.etaxonomy.taxeditor.navigation.key.polytomous.polytomousKeyViewPart">
289 </equals>
290 </with>
291 </activeWhen>
292 </handler>
293 </extension>
294
295
296 <!--extension
297 point="org.eclipse.ui.navigator.viewer">
298 <viewer
299 viewerId="org.eclipse.ui.examples.navigator.view">
300 </viewer>
301 <viewerContentBinding
302 viewerId="org.eclipse.ui.examples.navigator.view">
303 <includes>
304 <contentExtension
305 pattern="org.eclipse.ui.navigator.resourceContent" />
306 <contentExtension
307 pattern="org.eclipse.ui.navigator.resources.filters.*" />
308 </includes>
309 </viewerContentBinding>
310 <viewerActionBinding
311 viewerId="org.eclipse.ui.examples.navigator.view">
312 <includes>
313 <actionExtension
314 pattern="org.eclipse.ui.navigator.resources.*">
315 </actionExtension>
316 </includes>
317 </viewerActionBinding>
318 </extension>
319 <extension
320 point="org.eclipse.ui.navigator.navigatorContent">
321 <commonFilter
322 id="org.eclipse.ui.examples.navigator.filters.hideNonJavaProjects"
323 name="Hide non-Java projects">
324 <filterExpression>
325 <not>
326 <adapt
327 type="org.eclipse.core.resources.IProject">
328 <test
329 property="org.eclipse.core.resources.projectNature"
330 value="org.eclipse.jdt.core.javanature">
331 </test>
332 </adapt>
333 </not>
334 </filterExpression>
335 </commonFilter>
336 </extension-->
337
338
339
340
341
342
343 <extension
344 point="org.eclipse.ui.views">
345 <view
346 class="eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator"
347 icon="icons/edit_16x16.gif"
348 id="eu.etaxonomy.taxeditor.navigation.navigator"
349 name="Taxonomic Tree"/>
350 </extension>
351 <extension
352 point="org.eclipse.ui.navigator.navigatorContent">
353 <navigatorContent
354 contentProvider="eu.etaxonomy.taxeditor.navigation.navigator.ClassificationContentProvider"
355 id="eu.etaxonomy.taxeditor.navigation.classificationContent"
356 labelProvider="eu.etaxonomy.taxeditor.navigation.navigator.ClassificationLabelProvider"
357 name="Classification">
358 <triggerPoints>
359 <instanceof
360 value="eu.etaxonomy.taxeditor.navigation.navigator.Root">
361 </instanceof>
362 </triggerPoints>
363 <possibleChildren>
364 <instanceof
365 value="eu.etaxonomy.cdm.model.taxon.TaxonNode">
366 </instanceof>
367 </possibleChildren>
368 </navigatorContent>
369 <navigatorContent
370 contentProvider="eu.etaxonomy.taxeditor.navigation.navigator.TaxonNodeContentProvider"
371 id="eu.etaxonomy.taxeditor.navigation.taxonNodeContent"
372 labelProvider="eu.etaxonomy.taxeditor.navigation.navigator.TaxonNodeLabelProvider"
373 name="TaxonNode">
374 <triggerPoints>
375 <or>
376 <instanceof
377 value="eu.etaxonomy.cdm.model.taxon.TaxonNode">
378 </instanceof>
379 <and>
380 <instanceof
381 value="eu.etaxonomy.cdm.model.taxon.TaxonomicTree">
382 </instanceof>
383 <test
384 forcePluginActivation="true"
385 property="eu.etaxonomy.taxeditor.propertytests.hasTaxa">
386 </test>
387 </and>
388 </or>
389 </triggerPoints>
390 <dropAssistant
391 class="eu.etaxonomy.taxeditor.navigation.navigator.TaxonNodeDropAdapterAssistant"
392 id="eu.etaxonomy.taxeditor.navigation.navigator.dropassistant">
393 <possibleDropTargets>
394 <or>
395 <instanceof
396 value="eu.etaxonomy.cdm.model.taxon.TaxonNode">
397 </instanceof>
398 <instanceof
399 value="eu.etaxonomy.cdm.model.taxon.TaxonomicTree">
400 </instanceof>
401 </or>
402 </possibleDropTargets>
403 </dropAssistant>
404 <possibleChildren>
405 <instanceof
406 value="eu.etaxonomy.cdm.model.taxon.TaxonNode">
407 </instanceof>
408 </possibleChildren>
409 </navigatorContent>
410 <navigatorContent
411 activeByDefault="false"
412 contentProvider="eu.etaxonomy.taxeditor.navigation.navigator.SynonymContentProvider"
413 id="eu.etaxonomy.taxeditor.navigation.synonymContent"
414 labelProvider="eu.etaxonomy.taxeditor.navigation.navigator.SynonymLabelProvider"
415 name="Synonyms (experimental)"
416 priority="highest">
417 <triggerPoints>
418 <and>
419 <instanceof
420 value="eu.etaxonomy.cdm.model.taxon.TaxonNode">
421 </instanceof>
422 <test
423 forcePluginActivation="true"
424 property="eu.etaxonomy.taxeditor.propertytests.hasSynonyms">
425 </test>
426 </and>
427 </triggerPoints>
428 <possibleChildren>
429 <instanceof
430 value="eu.etaxonomy.cdm.model.taxon.Synonym">
431 </instanceof>
432 </possibleChildren>
433 </navigatorContent>
434 </extension>
435 <extension
436 point="org.eclipse.ui.navigator.viewer">
437 <viewer
438 viewerId="eu.etaxonomy.taxeditor.navigation.navigator">
439 <popupMenu
440 id="eu.etaxonomy.taxeditor.navigation.navigatorpopup">
441 </popupMenu>
442 </viewer>
443 <viewerContentBinding viewerId="eu.etaxonomy.taxeditor.navigation.navigator">
444 <includes>
445 <contentExtension
446 pattern="eu.etaxonomy.taxeditor.navigation.classificationContent">
447 </contentExtension>
448 <contentExtension pattern="eu.etaxonomy.taxeditor.navigation.taxonNodeContent"/>
449 <contentExtension pattern="eu.etaxonomy.taxeditor.navigation.taxonlinkhelper"/>
450 <contentExtension
451 pattern="eu.etaxonomy.taxeditor.navigation.synonymContent">
452 </contentExtension>
453 </includes>
454 </viewerContentBinding>
455 <!--viewer
456 popupMenuId="eu.etaxonomy.taxeditor.navigation.navigator#PopupMenu"
457 viewerId="eu.etaxonomy.taxeditor.navigation.navigator">
458 <options>
459 <property
460 name="org.eclipse.ui.navigator.hideAvailableExtensionsTab"
461 value="true">
462 </property>
463 </options>
464 </viewer-->
465 </extension>
466 <extension
467 point="org.eclipse.ui.navigator.linkHelper">
468 <linkHelper
469 class="eu.etaxonomy.taxeditor.navigation.navigator.TaxonLinkHelper"
470 id="eu.etaxonomy.taxeditor.navigation.taxonlinkhelper">
471 <selectionEnablement>
472 <instanceof value="eu.etaxonomy.cdm.model.taxon.TaxonNode"/>
473 </selectionEnablement>
474 <editorInputEnablement>
475 <instanceof value="eu.etaxonomy.taxeditor.editor.TaxonEditorInput"/>
476 </editorInputEnablement>
477 </linkHelper>
478 </extension>
479 <extension
480 point="org.eclipse.core.runtime.adapters">
481 <factory
482 adaptableType="org.eclipse.core.internal.resources.Workspace"
483 class="eu.etaxonomy.taxeditor.navigation.WorkbenchUndoContextAdapterFactory">
484 <adapter
485 type="org.eclipse.core.commands.operations.IUndoContext">
486 </adapter>
487 </factory>
488 </extension>
489 <extension
490 point="org.eclipse.core.expressions.propertyTesters">
491 <propertyTester
492 class="eu.etaxonomy.taxeditor.navigation.navigator.TaxonNodePropertyTester"
493 id="eu.etaxonomy.taxeditor.propertytests.navigatorPropertyTester"
494 namespace="eu.etaxonomy.taxeditor.propertytests"
495 properties="hasSynonyms"
496 type="eu.etaxonomy.cdm.model.taxon.TaxonNode">
497 </propertyTester>
498 <propertyTester
499 class="eu.etaxonomy.taxeditor.navigation.navigator.TaxonNodePropertyTester"
500 id="eu.etaxonomy.taxeditor.propertytests.navigatorPropertyTester"
501 namespace="eu.etaxonomy.taxeditor.propertytests"
502 properties="hasTaxa"
503 type="eu.etaxonomy.cdm.model.taxon.TaxonomicTree">
504 </propertyTester>
505 </extension>
506 <extension
507 point="org.eclipse.core.expressions.definitions">
508 <definition
509 id="isTaxonNode">
510 <with
511 variable="activeMenuSelection">
512 <iterate>
513 <instanceof
514 value="eu.etaxonomy.cdm.model.taxon.TaxonNode">
515 </instanceof>
516 </iterate>
517 </with>
518 </definition>
519 <definition
520 id="isTaxonomicTree">
521 <with
522 variable="activeMenuSelection">
523 <iterate>
524 <instanceof
525 value="eu.etaxonomy.cdm.model.taxon.TaxonomicTree">
526 </instanceof>
527 </iterate>
528 </with>
529 </definition>
530 <definition
531 id="isSynonymNode">
532 <with
533 variable="activeMenuSelection">
534 <iterate>
535 <instanceof
536 value="eu.etaxonomy.cdm.model.taxon.Synonym">
537 </instanceof>
538 </iterate>
539 </with>
540 </definition>
541 </extension>
542 </plugin>