fix #5988 Add Checklist Editor to generic "Open in..." menu
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / plugin.xml
index 83c8015b8108b114ed804308bc6c98ed9d453a4b..0bb691ff25cab3f3fe257f41f159fa93d724f4ee 100644 (file)
                      definitionId="isSynonym">
                </reference>
             </visibleWhen>
+         </command>
+          <command
+               commandId="eu.etaxonomy.taxeditor.editor.name.setAsBasionym"
+               label="%command.label.57"
+               style="push">
+            <visibleWhen>
+              <reference
+                     definitionId="isSynonymInHomotypicalGroupWithMoreSynonyms">
+               </reference>
+           </visibleWhen>
          </command>
          <command
                   commandId="eu.etaxonomy.taxeditor.editor.name.moveSynonymToAnotherAcceptedTaxon"
             </with>
          </activeWhen>
       </handler>
-      <handler
-            class="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistEditorHandler"
-            commandId="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistEditorHandler">
-      </handler>
       <handler
             class="eu.etaxonomy.taxeditor.editor.view.derivate.handler.DeleteDerivateHandler"
             commandId="org.eclipse.ui.edit.delete">
             </with>
          </activeWhen>
       </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistEditorHandler"
+            commandId="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistViewHandler">
+         <activeWhen>
+            <and>
+               <reference
+                     definitionId="isChecklistEditorEnabled">
+               </reference>
+               <or>
+                  <reference
+                        definitionId="isTaxonNode">
+                  </reference>
+                  <reference
+                        definitionId="isClassification">
+                  </reference>
+               </or>
+            </and>
+         </activeWhen>
+      </handler>
    </extension>
    <extension
          name="%extension.name"
             defaultHandler="eu.etaxonomy.taxeditor.editor.name.handler.SwapSynonymAndAcceptedHandler"
             id="eu.etaxonomy.taxeditor.editor.name.swapSynonymAndAccepted"
             name="%command.name.6">
+      </command>
+       <command
+            categoryId="eu.etaxonomy.taxeditor.editor.taxon.name.command.category"
+            defaultHandler="eu.etaxonomy.taxeditor.editor.name.handler.SetBasionymHandler"
+            id="eu.etaxonomy.taxeditor.editor.name.setAsBasionym"
+            name="%command.name.57">
       </command>
       <command
             categoryId="eu.etaxonomy.taxeditor.editor.taxon.name.command.category"
             name="%command.name.34">
       </command>
        <command
-             defaultHandler="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistEditorHandler"
              id="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistViewHandler"
              name="%command.name.38">
+          <commandParameter
+                id="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistViewHandler.uuid"
+                name="taxonNodeUuid"
+                optional="true"
+                typeId="eu.etaxonomy.taxeditor.uuidParameterType">
+          </commandParameter>
        </command>
       <command
             categoryId="eu.etaxonomy.taxeditor.editor.new.category"
                   property="eu.etaxonomy.taxeditor.editor.name.propertyTester.isNotHomotypicSynonymOfAcceptedTaxon">
             </test>
          </with>
+      </definition>
+       <definition
+            id="isSynonymInHomotypicalGroupWithMoreSynonyms">
+         <with
+               variable="selection">
+            <test
+                  property="eu.etaxonomy.taxeditor.editor.name.propertyTester.isSynonymInHomotypicalGroupWithMoreSynonyms">
+            </test>
+         </with>
       </definition>
       <definition
             id="isSynonym">
             class="eu.etaxonomy.taxeditor.editor.name.handler.NameEditorMenuPropertyTester"
             id="eu.etaxonomy.taxeditor.editor.name.propertyTester"
             namespace="eu.etaxonomy.taxeditor.editor.name.propertyTester"
-            properties="isAcceptedTaxon,isSynonym,isMisapplication,isTaxonBase,hasEmptyNames,isAcceptedAndHasNoHomotypicSynonyms,isNotHomotypicSynonymOfAcceptedTaxon"
+            properties="isAcceptedTaxon,isSynonym,isMisapplication,isTaxonBase,hasEmptyNames,isAcceptedAndHasNoHomotypicSynonyms,isNotHomotypicSynonymOfAcceptedTaxon,isSynonymInHomotypicalGroupWithMoreSynonyms"
             type="org.eclipse.jface.viewers.IStructuredSelection">
       </propertyTester>
       <propertyTester
             selection="eu.etaxonomy.cdm.model.taxon.TaxonNode"
             viewerName="%viewCommandMapping.viewerName.SPECIMEN_EDITOR">
       </viewCommandMapping>
+      <viewCommandMapping
+            commandId="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistViewHandler"
+            selection="eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode"
+            viewerName="%viewCommandMapping.viewerName.CHECKLIST_EDITOR">
+      </viewCommandMapping>
     </extension>
 </plugin>