ref #4611 Remove unused string constant
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / plugin.xml
index d44bd77183832366df05898333172c42d3cb6315..f8760fe45f54e14ac08fa1e0ec1c0b615175382c 100644 (file)
                name="taxeditor-editor.separator2"
                visible="true">
          </separator>
-         <dynamic
+        <!-- <dynamic
                class="eu.etaxonomy.taxeditor.editor.name.handler.GroupBasionymContributionItem"
                id="taxeditor-editor.dynamic.setBasionym">
             <visibleWhen>
                   </reference>
                </or>
             </visibleWhen>
-         </dynamic>
+         </dynamic>-->
          <command
                commandId="eu.etaxonomy.taxeditor.editor.name.swapSynonymAndAccepted"
                label="%command.label.17"
       </menuContribution>
       <menuContribution
             locationURI="popup:eu.etaxonomy.taxeditor.editor.key.polytomous.list">
-         <command
-               commandId="eu.etaxonomy.taxeditor.key.polytomous.command.new.child"
-               label="%command.label.23"
-               style="push">
-         </command>
+         <menu
+               label="%menu.label.4">
+            <command
+                  commandId="eu.etaxonomy.taxeditor.key.polytomous.command.new.node"
+                  label="%command.label.58"
+                  style="push">
+            </command>
+            <command
+                  commandId="eu.etaxonomy.taxeditor.key.polytomous.command.new.child"
+                  label="%command.label.23"
+                  style="push">
+            </command>
+         </menu>
          <command
                commandId="eu.etaxonomy.taxeditor.key.polytomous.command.new.sibling"
                label="%command.label.24"
                style="push">
          </command>
-         <dynamic
+       <!--  <dynamic
                class="eu.etaxonomy.taxeditor.view.CdmViewerContextMenu"
                id="eu.etaxonomy.taxeditor.editor.polytomous.list.cdmViewerContextMenu">
-         </dynamic>
+         </dynamic>-->
          <command
                commandId="eu.etaxonomy.taxeditor.key.polytomous.command.refresh"
                label="%command.label.25"
       </handler>
       <handler
             class="eu.etaxonomy.taxeditor.editor.key.polytomous.handler.DeleteNodeHandler"
-            commandId="eu.etaxonomy.taxeditor.editor.key.polytomous.command.delete">
+            commandId="eu.etaxonomy.taxeditor.key.polytomous.command.delete">
          <activeWhen>
-            <with
+           <with
                   variable="activePartId">
                <equals
                      value="eu.etaxonomy.taxeditor.editor.key">
                </equals>
             </with>
          </activeWhen>
+         <enabledWhen>
+            <with
+                  variable="selection">
+               <test
+                     property="eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyPropertyTester.isKeyNode">
+               </test>
+            </with>
+         </enabledWhen>
       </handler>
       <handler
             class="eu.etaxonomy.taxeditor.editor.view.concept.handler.DeleteConceptRelationHandler"
       <handler
             class="eu.etaxonomy.taxeditor.editor.key.polytomous.handler.RemotingCreateChildPolytomousKeyNodeHandler"
             commandId="eu.etaxonomy.taxeditor.key.polytomous.command.new.child">
-         <activeWhen>
+        <activeWhen>
             <reference
                   definitionId="isRemoting">
             </reference>
          </activeWhen>
+      </handler>
+       <handler
+            class="eu.etaxonomy.taxeditor.editor.key.polytomous.handler.InsertNewNodeHandler"
+            commandId="eu.etaxonomy.taxeditor.key.polytomous.command.new.node">
+          <enabledWhen>
+             <with
+                   variable="selection">
+            <test
+                  property="eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyPropertyTester.isKeyNode">
+            </test>
+         
+             </with>
+          </enabledWhen>
       </handler>
       <handler
             class="eu.etaxonomy.taxeditor.editor.key.polytomous.handler.RemotingCreateSiblingPolytomousKeyNodeHandler"
             commandId="eu.etaxonomy.taxeditor.key.polytomous.command.new.sibling">
          <activeWhen>
-            <reference
-                  definitionId="isRemoting">
-            </reference>
+            <with
+                  variable="activePartId">
+               <equals
+                     value="eu.etaxonomy.taxeditor.editor.key">
+               </equals>
+            </with>
          </activeWhen>
+         <enabledWhen>
+             <with
+                   variable="selection">
+            <test
+                  property="eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyPropertyTester.isKeyNode">
+            </test>
+         
+             </with>
+          </enabledWhen>
       </handler>
       <handler
             class="eu.etaxonomy.taxeditor.handler.defaultHandler.OpenReferencingObjectsView"
             </and>
          </activeWhen>
       </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.editor.key.polytomous.handler.RefreshNodeNumberingHandler"
+            commandId="eu.etaxonomy.taxeditor.key.polytomous.command.refresh">
+         <enabledWhen>
+            <with
+                  variable="selection">
+               <test
+                     property="eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyPropertyTester.isKeyNode">
+               </test>
+            </with>
+         </enabledWhen>
+      </handler>
    </extension>
    <extension
          name="%extension.name"
             id="eu.etaxonomy.taxeditor.editor.name.createMisapplication"
             name="%command.name.36">
       </command>
-      <!--command
+    <!--  <command
             defaultHandler="eu.etaxonomy.taxeditor.editor.handler.MoveTaxonHandler"
             id="eu.etaxonomy.taxeditor.editor.name.moveTaxon"
             name="Move Taxon">
-      </command-->
+      </command>-->
       <command
             categoryId="eu.etaxonomy.taxeditor.editor.taxon.name.command.category"
             defaultHandler="eu.etaxonomy.taxeditor.editor.name.handler.ChangeToSynonymHandler"
       </category>
       <command
             categoryId="eu.etaxonomy.taxeditor.editor.key.category"
-            defaultHandler="eu.etaxonomy.taxeditor.editor.key.polytomous.handler.CreateChildNodeHandler"
+           
             id="eu.etaxonomy.taxeditor.key.polytomous.command.new.child"
             name="%command.name.28">
       </command>
-      <command
+       <command
             categoryId="eu.etaxonomy.taxeditor.editor.key.category"
-            defaultHandler="eu.etaxonomy.taxeditor.editor.key.polytomous.handler.CreateSiblingNodeHandler"
+            
+            id="eu.etaxonomy.taxeditor.key.polytomous.command.new.node"
+            name="%command.name.58">
+      </command>
+        <command
+             categoryId="eu.etaxonomy.taxeditor.editor.key.category"
             id="eu.etaxonomy.taxeditor.key.polytomous.command.new.sibling"
             name="%command.name.29">
       </command>
       <command
             categoryId="eu.etaxonomy.taxeditor.editor.key.category"
-            defaultHandler="eu.etaxonomy.taxeditor.editor.key.polytomous.handler.RefreshNodeNumberingHandler"
+           
             id="eu.etaxonomy.taxeditor.key.polytomous.command.refresh"
             name="%command.name.30">
       </command>
             name="%command.name.31">
       </command>
       <command
-            defaultHandler="eu.etaxonomy.taxeditor.editor.key.polytomous.handler.DeleteNodeHandler"
+            categoryId="eu.etaxonomy.taxeditor.editor.key.category"
             id="eu.etaxonomy.taxeditor.key.polytomous.command.delete"
             name="%command.name.50">
       </command>
       <command
             defaultHandler="eu.etaxonomy.taxeditor.editor.handler.defaultHandler.DefaultOpenSpecimenEditorForTypeSpecimenHandler"
             id="eu.etaxonomy.taxeditor.openSpecimenEditorForTypeSpecimen"
-            name="Open specimen editor for type specimen">
+            name="%command.name.OPEN_EDITOR_FOR_TYPE_SPECIMEN">
       </command>
         
    </extension>
          <test
                property="eu.etaxonomy.taxeditor.preference.CdmStorePropertyTester.isRemoting">
          </test>
+      </definition>
+       <definition
+            id="isKeyNode">
+          <with
+                variable="selection">
+             <test
+                   property="eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyPropertyTester.isKeyNode">
+             </test>
+          </with>
       </definition>
       <definition
             id="isSequence">
             id="eu.etaxonomy.taxeditor.editor.name.propertyTester"
             namespace="eu.etaxonomy.taxeditor.editor.name.propertyTester"
             properties="isAcceptedTaxon,isSynonym,isMisapplication,isTaxonBase,hasEmptyNames,isAcceptedAndHasNoHomotypicSynonyms,isNotHomotypicSynonymOfAcceptedTaxon,isSynonymInHomotypicalGroupWithMoreSynonyms,isOrphaned"
-            type="org.eclipse.jface.viewers.IStructuredSelection">
+            type="java.lang.Object">
       </propertyTester>
       <propertyTester
             class="eu.etaxonomy.taxeditor.editor.view.descriptive.handler.DescriptionsMenuPropertyTester"
             properties="isLinkedWithTaxonSelection"
             type="eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView">
       </propertyTester>
+      <propertyTester
+            class="eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyPropertyTester"
+            id="eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyPropertyTester"
+            namespace="eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyPropertyTester"
+            properties="isKeyNode"
+            type="org.eclipse.jface.viewers.IStructuredSelection">
+      </propertyTester>
    </extension>
    <extension
          point="org.eclipse.ui.bindings">   
       <viewCommandMapping
             commandId="eu.etaxonomy.taxeditor.openSpecimenEditorForTypeSpecimen"
             selection="eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation"
-            viewerName="Specimen Editor">
+            viewerName="%viewCommandMapping.viewerName.SPECIMEN_EDITOR">
       </viewCommandMapping>
     </extension>
 </plugin>