Merge branch 'release/4.7.0'
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / plugin.xml
index ef0345253959952e95158510f4a3ba4caf50f939..e04dadc0c2e06f17d1b7930450dec646d948c561 100644 (file)
                </and>
             </visibleWhen>
          </command>
-         <separator
-               name="eu.etaxonomy.taxeditor.store.separator_derivative_start"
-               visible="true">
-         </separator>
-         <command
-               commandId="eu.etaxonomy.taxeditor.editor.openSpecimenEditorFromMenu"
-               label="%command.label.DERIVATIVE_EDITOR"
-               style="push">
-            <visibleWhen
-                  checkEnabled="true">
-               <reference
-                     definitionId="isCdmStoreConnected">
-               </reference>
-            </visibleWhen>
-         </command>
-         <separator
-               name="eu.etaxonomy.taxeditor.editor.separator1"
-               visible="true">
-         </separator>
       </menuContribution>
       <menuContribution
             locationURI="menu:eu.etaxonomy.taxeditor.menu.showView?before=eu.etaxonomy.taxeditor.store.showViewMenu.internal">
                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>
-         <command
-               commandId="eu.etaxonomy.taxeditor.key.polytomous.command.new.node"
-               label="%command.label.58"
-               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"
       </menuContribution>
       <menuContribution
             locationURI="popup:eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView">
-         <separator
-               name="eu.etaxonomy.taxeditor.editor.separator4"
-               visible="true">
-         </separator>
-         <dynamic
-               class="eu.etaxonomy.taxeditor.editor.view.derivate.contextMenu.DerivateViewContextMenu"
-               id="eu.etaxonomy.taxeditor.editor.view.derivate.DerivateContextMenu">
-         </dynamic>
-         <dynamic
-               class="eu.etaxonomy.taxeditor.view.CdmViewerContextMenu"
-               id="eu.etaxonomy.taxeditor.editor.derivativeEditor.CdmViewerContextMenu">
-         </dynamic>
-         <separator
-               name="eu.etaxonomy.taxeditor.editor.separator1"
-               visible="true">
-         </separator>
          <command
                commandId="eu.etaxonomy.taxeditor.editor.derivative.toggleLinkWithTaxonSelection"
                label="%command.label.LINK_WITH_TAXON_SELECTION"
                label="%command.label.54"
                style="push">
          </command>
+         <separator
+               name="eu.etaxonomy.taxeditor.editor.separator1"
+               visible="true">
+         </separator>
+         <dynamic
+               class="eu.etaxonomy.taxeditor.editor.view.derivate.contextMenu.DerivateViewContextMenu"
+               id="eu.etaxonomy.taxeditor.editor.view.derivate.DerivateContextMenu">
+         </dynamic>
+         <separator
+               name="eu.etaxonomy.taxeditor.editor.separator1"
+               visible="true">
+         </separator>
+         <dynamic
+               class="eu.etaxonomy.taxeditor.view.CdmViewerContextMenu"
+               id="eu.etaxonomy.taxeditor.editor.derivativeEditor.CdmViewerContextMenu">
+         </dynamic>
       </menuContribution>
       <menuContribution
             locationURI="popup:eu.etaxonomy.taxeditor.editor.view.dataimport.SpecimenImportEditor">
                   id="eu.etaxonomy.taxeditor.editor.view.concept.menus.new">
             </dynamic>
          </menu>
-         <command
-               commandId="eu.etaxonomy.taxeditor.editor.view.concept.command.open"
-               label="%command.label.43"
-               style="push">
-         </command>
+         <dynamic
+               class="eu.etaxonomy.taxeditor.view.CdmViewerContextMenu"
+               id="eu.etaxonomy.taxeditor.view.context.CdmViewerContextMenu">
+         </dynamic>
          <separator
                name="eu.etaxonomy.taxeditor.editor.view.concept.menu.separator1"
                visible="true">
             </command>
          </toolbar>
       </menuContribution>
+      <menuContribution
+            locationURI="menu:bulkeditor.menus.openmenu">
+         <command
+               commandId="eu.etaxonomy.taxeditor.editor.openSpecimenEditorFromMenu"
+               label="%command.label.DERIVATIVE_EDITOR"
+               style="push">
+            <visibleWhen
+                  checkEnabled="true">
+               <reference
+                     definitionId="isCdmStoreConnected">
+               </reference>
+            </visibleWhen>
+         </command>
+      </menuContribution>
    </extension>
    <extension
          point="org.eclipse.ui.handlers">
       </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.InsertNewNodeHandler"
             commandId="eu.etaxonomy.taxeditor.key.polytomous.command.new.node">
-         <activeWhen>
-            <reference
-                  definitionId="isRemoting">
-            </reference>
-         </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.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"
             </with>
          </activeWhen>
       </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.editor.view.derivate.handler.OpenDerivativeEditorForSpecimenOrOBservationBase"
+            commandId="eu.etaxonomy.taxeditor.editor.openSpecimenEditor">
+         <activeWhen>
+            <with
+                  variable="activePartId">
+               <equals
+                     value="bulkeditor.editor">
+               </equals>
+            </with>
+         </activeWhen>
+      </handler>
       <handler
             class="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistEditorHandler"
             commandId="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistViewHandler">
             </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"
       </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
             categoryId="eu.etaxonomy.taxeditor.editor.key.category"
-            defaultHandler="eu.etaxonomy.taxeditor.editor.key.polytomous.handler.InsertNewNodeHandler"
+            
             id="eu.etaxonomy.taxeditor.key.polytomous.command.new.node"
             name="%command.name.58">
       </command>
-      <command
-            categoryId="eu.etaxonomy.taxeditor.editor.key.category"
-            defaultHandler="eu.etaxonomy.taxeditor.editor.key.polytomous.handler.CreateSiblingNodeHandler"
+        <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>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.editor.view.concept.handler.OpenRelatedConceptInBulkEditorHandler"
+            id="eu.etaxonomy.taxeditor.editor.openBulkEditorForTaxonRelationship"
+            name="Open bulk editor for taxon relationship">
       </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"
-            id="eu.etaxonomy.taxeditor.descriptions.PropertyTester"
+            id="eu.etaxonomy.taxeditor.descriptions.propertyTester"
             namespace="eu.etaxonomy.taxeditor.descriptions.propertyTester"
             properties="isMedia,isDescription,isDescriptionElement,isDeletable,isFeatureNodeContainer,isImageGallery,isTaxonEditor,isBulkEditor,isDerivateEditor, isIndividualsAssociation"
             type="org.eclipse.jface.viewers.TreeSelection">
             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="%viewCommandMapping.viewerName.SPECIMEN_EDITOR">
+      </viewCommandMapping>
+      <viewCommandMapping
+            commandId="eu.etaxonomy.taxeditor.editor.view.concept.command.open"
+            selection="eu.etaxonomy.cdm.model.taxon.TaxonRelationship"
+            viewerName="Name Editor">
+      </viewCommandMapping>
+      <viewCommandMapping
+            commandId="eu.etaxonomy.taxeditor.editor.openBulkEditorForTaxonRelationship"
+            selection="eu.etaxonomy.cdm.model.taxon.TaxonRelationship"
+            viewerName="Bulk Editor">
+      </viewCommandMapping>
+      <viewCommandMapping
+            commandId="eu.etaxonomy.taxeditor.editor.openSpecimenEditor"
+            selection="eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase"
             viewerName="Specimen Editor">
       </viewCommandMapping>
     </extension>