ref #6566 Sort main menu
[taxeditor.git] / eu.etaxonomy.taxeditor.bulkeditor / plugin.xml
index f72a7b25eb896ba15ad30bbd8d1844f702ce14bd..b2babca3927e69fde7e8927c455c09caa1cfdb79 100644 (file)
@@ -35,7 +35,7 @@
    <extension
          point="org.eclipse.ui.menus">
       <menuContribution
-            locationURI="menu:org.eclipse.ui.main.menu.window?before=eu.etaxonomy.taxeditor.application.windowMenu.last">
+            locationURI="menu:eu.etaxonomy.taxeditor.workbench.menu.window?before=eu.etaxonomy.taxeditor.application.windowMenu.last">
          <menu
                id="bulkeditor.menus.openmenu"
                label="%menu.label">
             allPopups="false"
             locationURI="menu:eu.etaxonomy.taxeditor.menu.showView?after=org.eclipse.ui.views.showView.supplemental">
          <command
-               commandId="eu.etaxonomy.taxeditor.openReferencingObjectsView"
+               commandId="eu.etaxonomy.taxeditor.openReferencingObjectsViewFromMenu"
                label="%command.label.OPEN_REFERENCING_OBJECTS_VIEW"
                style="push">
+            <visibleWhen
+                  checkEnabled="true">
+               <reference
+                     definitionId="isCdmStoreConnected">
+               </reference>
+            </visibleWhen>
          </command>
       </menuContribution>
    </extension>
             name="%command.name.10">
       </command>
       <command
-            defaultHandler="eu.etaxonomy.taxeditor.handler.defaultHandler.OpenReferencingObjectsView"
             id="eu.etaxonomy.taxeditor.openReferencingObjectsView"
             name="%command.name.OPEN_REFERENCING_OBJECTS_VIEW">
       </command>
             name="%command.name.OPEN_BULK_EDITOR_FOR_TAXON_NODE">
       </command>
       <command
-            defaultHandler="eu.etaxonomy.taxeditor.bulkeditor.handler.defaultHandler.OpenBulkEditorForIdentifiableEntity"
             id="eu.etaxonomy.taxeditor.bulkeditor.openBulkEditorForIdentifiableEntity"
             name="Open bulk editor for identifiable entity">
          <commandParameter
                typeId="eu.etaxonomy.taxeditor.uuidParameterType">
          </commandParameter>
       </command>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.handler.defaultHandler.OpenReferencingObjectsView"
+            id="eu.etaxonomy.taxeditor.openReferencingObjectsViewFromMenu"
+            name="%command.name.OPEN_REFERENCING_OBJECTS_VIEW">
+      </command>
       <!--command
             defaultHandler="eu.etaxonomy.taxeditor.bulkeditor.handler.NewEntityHandler"
             id="eu.etaxonomy.taxeditor.bulkeditor.command.new"
             </test>
          </with>
       </definition>
+      <definition
+            id="isBulkEditorSupported">
+         <with
+               variable="selection">
+            <test
+                  property="eu.etaxonomy.taxeditor.bulkeditor.command.BulkEditorSelectionPropertyTester.isBulkEditorSupported">
+            </test>
+         </with>
+      </definition>
+      <definition
+            id="isGroupEditor">
+         <with
+               variable="activeEditor">
+            <test
+                  property="taxeditor-bulkeditor.propertyTester.isGroupEditor">
+            </test>
+         </with>
+      </definition>
    </extension>
    <extension
          point="org.eclipse.core.expressions.propertyTesters">
             properties="isTeam, isPerson"
             type="java.lang.Object">
       </propertyTester>
+      <propertyTester
+            class="eu.etaxonomy.taxeditor.bulkeditor.command.BulkEditorSelectionPropertyTester"
+            id="eu.etaxonomy.taxeditor.bulkeditor.command.BulkEditorSelectionPropertyTester"
+            namespace="eu.etaxonomy.taxeditor.bulkeditor.command.BulkEditorSelectionPropertyTester"
+            properties="isBulkEditorSupported"
+            type="org.eclipse.jface.viewers.IStructuredSelection">
+      </propertyTester>
    </extension>
    <extension
          point="org.eclipse.ui.handlers">
             class="eu.etaxonomy.taxeditor.bulkeditor.handler.ConvertPerson2TeamHandler"
             commandId="eu.etaxonomy.taxeditor.bulkeditor.convertPerson2Team">
       </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.bulkeditor.handler.defaultHandler.OpenBulkEditorForIdentifiableEntity"
+            commandId="eu.etaxonomy.taxeditor.bulkeditor.openBulkEditorForIdentifiableEntity">
+         <activeWhen>
+            <and>
+               <reference
+                     definitionId="isBulkEditorSupported">
+               </reference>
+               <not>
+                  <with
+                        variable="activePartId">
+                     <equals
+                           value="bulkeditor.editor">
+                     </equals>
+                  </with>
+               </not>
+            </and>
+         </activeWhen>
+      </handler>
       
    </extension>
    <extension
             selection="eu.etaxonomy.cdm.model.taxon.TaxonNode"
             viewerName="%viewCommandMapping.viewerName.BULK_EDITOR">
       </viewCommandMapping>
-      <viewCommandMapping
-            commandId="eu.etaxonomy.taxeditor.bulkeditor.openBulkEditorForIdentifiableEntity"
-            selection="eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache"
-            viewerName="%viewCommandMapping.viewerName.BULK_EDITOR">
-      </viewCommandMapping>
       <viewCommandMapping
             commandId="eu.etaxonomy.taxeditor.bulkeditor.openBulkEditorForIdentifiableEntity"
             selection="eu.etaxonomy.cdm.model.common.IdentifiableEntity"
             viewerName="%viewCommandMapping.viewerName.BULK_EDITOR">
       </viewCommandMapping>
    </extension>
+   <extension
+         id="id1"
+         point="org.eclipse.e4.workbench.model">
+      <fragment
+            apply="always"
+            uri="fragment.e4xmi">
+      </fragment>
+   </extension>
 <!-- start set marker -->
 
 </plugin>