Set Visibility according to CdmStore connection
[taxeditor.git] / eu.etaxonomy.taxeditor.navigation / plugin.xml
index 5caf3402c685bcb28702864b1a12a66c5b6d29ae..de59d8bb0944d5027f2a3fa81b57a5e41f671ff5 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
                </or>
             </visibleWhen>
          </command>
+         <command
+               commandId="eu.etaxonomy.taxeditor.store.open"
+               label="Edit"
+               style="push">
+            <visibleWhen
+                  checkEnabled="true">
+               <with
+                     variable="selection">
+                  <reference
+                        definitionId="isClassification">
+                  </reference>
+               </with>
+            </visibleWhen>
+         </command>
          <command
                commandId="eu.etaxonomy.taxeditor.navigator.command.update.changeAcceptedToSynonym"
                label="%command.label.6"
                id="eu.etaxonomy.taxeditor.navigation.search.toolbar">
             <control
                   class="eu.etaxonomy.taxeditor.navigation.search.SearchBar">
+               <visibleWhen
+                     checkEnabled="true">
+                  <reference
+                        definitionId="isCdmStoreConnected">
+                  </reference>
+               </visibleWhen>
             </control>
          </toolbar>
       </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
       <command
             defaultHandler="eu.etaxonomy.taxeditor.navigation.navigator.handler.DeleteHandler"
             id="eu.etaxonomy.taxeditor.navigation.command.delete"
-            name="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
          </with>
       </definition>
    </extension>
+   <extension
+         point="eu.etaxonomy.taxeditor.store.cdmViewer">
+      <cdmViewer
+            class="eu.etaxonomy.taxeditor.navigation.NavigationCdmViewer">
+      </cdmViewer>
+   </extension>
 </plugin>