Merge branch 'hotfix/4.1.1' into develop
[taxeditor.git] / eu.etaxonomy.taxeditor.navigation / plugin.xml
index 2317fff545aff5dbe3fe426150b95c7e81653e71..e34d01f06c54eb39fb7d00c6c73d0e16ebdaec00 100644 (file)
          <dynamic
                class="eu.etaxonomy.taxeditor.navigation.RecentNamesContributionItem"
                id="eu.etaxonomy.taxeditor.navigation.recentnames">
+            <visibleWhen
+                  checkEnabled="true">
+               <reference
+                     definitionId="isCdmStoreConnected">
+               </reference>
+            </visibleWhen>
          </dynamic>
       </menuContribution>
       <menuContribution
                   name="org.eclipse.ui.views.showView.viewId"
                   value="eu.etaxonomy.taxeditor.navigation.navigator">
             </parameter>
+            <visibleWhen
+                  checkEnabled="true">
+               <reference
+                     definitionId="isCdmStoreConnected">
+               </reference>
+            </visibleWhen>
          </command>
          <command
                commandId="org.eclipse.ui.views.showView"
                   name="org.eclipse.ui.views.showView.viewId"
                   value="eu.etaxonomy.taxeditor.navigation.key.polytomous.polytomousKeyViewPart">
             </parameter>
+            <visibleWhen
+                  checkEnabled="true">
+               <reference
+                     definitionId="isCdmStoreConnected">
+               </reference>
+            </visibleWhen>
          </command>
       </menuContribution>
       <menuContribution
             locationURI="popup:eu.etaxonomy.taxeditor.navigation.search.searchResultView">
-         <command
-               commandId="eu.etaxonomy.taxeditor.navigation.command.editTaxon"
-               label="%command.label.1"
-               style="push">
-         </command>
+         <dynamic
+               class="eu.etaxonomy.taxeditor.view.CdmViewerContextMenu"
+               id="eu.etaxonomy.taxeditor.navigation.cdmViewerContextMenu">
+         </dynamic>
+         <separator
+               name="eu.etaxonomy.taxeditor.navigation.separator2">
+         </separator>
       </menuContribution>
       <menuContribution
             locationURI="popup:eu.etaxonomy.taxeditor.navigation.navigatorpopup">
                   commandId="eu.etaxonomy.taxeditor.navigation.command.create.taxonNode"
                   label="%command.label.2"
                   style="push">
+               <visibleWhen
+                     checkEnabled="true">
+                  <with
+                        variable="selection">
+                     <count
+                           value="+">
+                     </count>
+                  </with>
+               </visibleWhen>
             </command>
             <separator
                   name="eu.etaxonomy.navigation.menu.new.separator1"
                name="taxeditor-navigation.separator1"
                visible="true">
          </separator>
-         <command
-               commandId="eu.etaxonomy.taxeditor.navigation.command.update.editSelection"
-               label="%command.label.5"
-               style="push">       
-            <visibleWhen
-                  checkEnabled="true">
-               <or>
-                  <reference
-                        definitionId="isTaxonNode">
-                  </reference>
-                  <reference
-                        definitionId="isTaxonomicTree">
-                  </reference>
-               </or>
-            </visibleWhen>
-         </command>
+         <dynamic
+               class="eu.etaxonomy.taxeditor.view.CdmViewerContextMenu"
+               id="eu.etaxonomy.taxeditor.navigation.cdmViewerContextMenu">
+         </dynamic>
+         <separator
+               name="eu.etaxonomy.taxeditor.navigation.separator2">
+         </separator>
          <command
                commandId="eu.etaxonomy.taxeditor.navigator.command.update.changeAcceptedToSynonym"
                label="%command.label.6"
                visible="true">
          </separator>
          <command
-               commandId="org.eclipse.ui.edit.delete"
+               commandId="eu.etaxonomy.taxeditor.navigation.command.delete"
                label="%command.label.10"
                style="push">
             <visibleWhen
                            definitionId="isSynonymNode">
                      </reference>
                   </not>
+                  <with
+                        variable="selection">
+                     <count
+                           value="+">
+                     </count>
+                  </with>
                </and>
             </visibleWhen>
          </command>
                style="push">
             <visibleWhen
                   checkEnabled="true">
-               <reference
-                     definitionId="isCdmStoreConnected">
-               </reference>
+               <and>
+                  <reference
+                        definitionId="isCdmStoreConnected">
+                  </reference>
+                  <reference
+                        definitionId="isTaxonNode">
+                  </reference></and>
             </visibleWhen>
          </command>
       </menuContribution>
                commandId="eu.etaxonomy.taxeditor.navigation.command.create.taxonNode"
                label="%command.label.13"
                style="push">
+            <visibleWhen
+                  checkEnabled="true">
+               <reference
+                     definitionId="isCdmStoreConnected">
+               </reference>
+            </visibleWhen>
          </command>
          <separator
                name="eu.etaxonomy.navigation.menu.new.separator1"
                id="eu.etaxonomy.taxeditor.navigation.create.classificationHandler"
                label="%command.label.14"
                style="push">
+            <visibleWhen
+                  checkEnabled="true">
+               <reference
+                     definitionId="isCdmStoreConnected">
+               </reference>
+            </visibleWhen>
          </command>
       </menuContribution>
       <menuContribution
                label="%command.label.15"
                style="push">
          </command>
+         <dynamic
+               class="eu.etaxonomy.taxeditor.view.CdmViewerContextMenu"
+               id="eu.etaxonomy.taxeditor.navigation.polytomous.cdmViewerContextMenu">
+         </dynamic>
          <command
                commandId="eu.etaxonomy.taxeditor.navigation.key.polytomous.editNodes"
                label="%command.label.16"
                visible="true">
          </separator>
          <command
-               commandId="org.eclipse.ui.edit.delete"
+               commandId="eu.etaxonomy.taxeditor.navigation.key.polytomous.command.delete"
                label="%command.label.19"
                style="push">
          </command>
    </extension>
    <extension
          point="org.eclipse.ui.commands">
-      <command
-            defaultHandler="eu.etaxonomy.taxeditor.navigation.navigator.handler.EditHandler"
-            id="eu.etaxonomy.taxeditor.navigation.command.update.editSelection"
-            name="%command.name.1">
-      </command>
       <command
             defaultHandler="eu.etaxonomy.taxeditor.navigation.navigator.handler.MoveTaxonHandler"
             id="eu.etaxonomy.taxeditor.navigation.command.update.moveTaxon"
             id="eu.etaxonomy.taxeditor.navigation.navigator.handler.OpenFixClassificationHierarchyHandler"
             name="%command.name.10">
       </command>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.navigation.navigator.handler.DeleteHandler"
+            id="eu.etaxonomy.taxeditor.navigation.command.delete"
+            name="%command.name.11">
+      </command>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.navigation.key.polytomous.handler.DeleteHandler"
+            id="eu.etaxonomy.taxeditor.navigation.key.polytomous.command.delete"
+            name="%command.name.11">
+      </command>
    </extension>
    <extension
          point="org.eclipse.ui.handlers">
       <handler
             class="eu.etaxonomy.taxeditor.navigation.navigator.handler.DeleteHandler"
-            commandId="org.eclipse.ui.edit.delete">
+            commandId="eu.etaxonomy.taxeditor.navigation.navigator.command.delete">
          <activeWhen>
             <with
                   variable="activePartId">
       </handler>
       <handler
             class="eu.etaxonomy.taxeditor.navigation.key.polytomous.handler.DeleteHandler"
-            commandId="org.eclipse.ui.edit.delete">
+            commandId="eu.etaxonomy.taxeditor.navigation.key.polytomous.command.delete">
          <activeWhen>
             <with
                   variable="activePartId">
             </with>
          </activeWhen>
       </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.navigation.navigator.handler.RemotingChangeAcceptedTaxonToSynonymHandler"
+            commandId="eu.etaxonomy.taxeditor.navigator.command.update.changeAcceptedToSynonym">
+         <activeWhen>
+            <reference
+                  definitionId="isRemoting">
+            </reference>
+         </activeWhen>
+      </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.navigation.navigator.handler.RemotingMoveFactualDataHandler"
+            commandId="eu.etaxonomy.taxeditor.navigation.moveFactualData">
+         <activeWhen>
+            <reference
+                  definitionId="isRemoting">
+            </reference>
+         </activeWhen>
+      </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.navigation.navigator.handler.RemotingMoveTaxonNodeHandler"
+            commandId="eu.etaxonomy.taxeditor.navigation.command.update.moveTaxon">
+         <activeWhen>
+            <reference
+                  definitionId="isRemoting">
+            </reference>
+         </activeWhen>
+      </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.navigation.navigator.handler.RemotingDeleteTaxonNodeHandler"
+            commandId="eu.etaxonomy.taxeditor.navigation.command.delete">
+         <activeWhen>
+            <reference
+                  definitionId="isRemoting">
+            </reference>
+         </activeWhen>
+      </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.navigation.key.polytomous.handler.RemotingDeletePolytomousKeyHandler"
+            commandId="eu.etaxonomy.taxeditor.navigation.key.polytomous.command.delete">
+         <activeWhen>
+            <reference
+                  definitionId="isRemoting">
+            </reference>
+         </activeWhen>
+      </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.navigation.key.polytomous.handler.RemotingUpdatePolytomousKeyAllNodesHandler"
+            commandId="eu.etaxonomy.taxeditor.navigation.key.polytomous.refreshKeyNodes">
+         <activeWhen>
+            <reference
+                  definitionId="isRemoting">
+            </reference>
+         </activeWhen>
+      </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.navigation.key.polytomous.handler.RemotingEditPolytomousKeyNodesHandler"
+            commandId="eu.etaxonomy.taxeditor.navigation.key.polytomous.editNodes">
+         <activeWhen>
+            <reference
+                  definitionId="isRemoting">
+            </reference>
+         </activeWhen>
+      </handler>
    </extension>
 
       
          class="eu.etaxonomy.taxeditor.preference.PreferencePropertyTester"
          id="eu.etaxonomy.taxeditor.preferences.propertyTester"
          namespace="eu.etaxonomy.taxeditor.preferences.propertyTester"
-         properties="isCdmStoreConnected, isShowExperimentalFeatures, isChecklistEditorEnabled"
+         properties="isShowExperimentalFeatures, isChecklistEditorEnabled"
          type="org.eclipse.jface.viewers.IStructuredSelection">
    </propertyTester>
+   <propertyTester
+         class="eu.etaxonomy.taxeditor.preference.CdmStorePropertyTester"
+         id="eu.etaxonomy.taxeditor.preference.CdmStorePropertyTester"
+         namespace="eu.etaxonomy.taxeditor.preference.CdmStorePropertyTester"
+         properties="isCdmStoreConnected,isRemoting,isStandAlone"
+         type="java.lang.Object">
+   </propertyTester>
    </extension>
    <extension
          point="org.eclipse.core.expressions.definitions">
       </definition>
       <definition
             id="isCdmStoreConnected">
-         <with
-               variable="selection">
-            <test
-                  property="eu.etaxonomy.taxeditor.preferences.propertyTester.isCdmStoreConnected">
-            </test>
-         </with>
+         <test
+               property="eu.etaxonomy.taxeditor.preference.CdmStorePropertyTester.isCdmStoreConnected">
+         </test>
       </definition>
       <definition
             id="isShowExperimentalFeatures">
             </test>
          </with>
       </definition>
+      <definition
+            id="isRemoting">
+         <test
+               property="eu.etaxonomy.taxeditor.preference.CdmStorePropertyTester.isRemoting">
+         </test>
+      </definition>
+      <definition
+            id="isStandAlone">
+         <test
+               property="eu.etaxonomy.taxeditor.preference.CdmStorePropertyTester.isStandAlone">
+         </test>
+      </definition>
    </extension>
 </plugin>