fix #6587 Correctly order "Window" menu
[taxeditor.git] / eu.etaxonomy.taxeditor.bulkeditor / plugin.xml
index a329fe597e178592737edd3ee8a5cc1023cec424..b80d6e61e74fc1bf7aaa614e89be0a91ee0b9cf0 100644 (file)
    <extension
          point="org.eclipse.ui.menus">
       <menuContribution
-            locationURI="menu:org.eclipse.ui.main.menu.window?before=eu.etaxonomy.taxeditor.application.windowMenu.last">
-         <menu
-               id="bulkeditor.menus.openmenu"
-               label="%menu.label">
-            <visibleWhen
-                  checkEnabled="true">
-               <reference
-                     definitionId="isCdmStoreConnected">
-               </reference>
-            </visibleWhen>
-         </menu>
+            locationURI="menu:eu.etaxonomy.taxeditor.workbench.menu.window">
          <menu
                label="%menu.label.0">
             <visibleWhen
                </reference>
             </visibleWhen>
          </dynamic>
-         <!--command
-               commandId="taxeditor-nameeditor.commands.open"
-               label="Open Name Editor"
-               style="push">
-            <visibleWhen
-                  checkEnabled="false">
-               <reference
-                     definitionId="pigsFly">
-               </reference>
-            </visibleWhen>
-         </command-->
       </menuContribution>
       <menuContribution
             locationURI="popup:#BulkEditorContext">
             </visibleWhen>
          </menu>
          <separator
-               name="eu.etaxonomy.taxeditor.bulkeditor.separator1">
+               name="taxeditor-bulkeditor.separator4"
+               visible="true">
          </separator>
          <command
                commandId="bulkeditor.commands.setmergetarget"
                </reference>
             </visibleWhen>
          </command>
+         <separator
+               name="eu.etaxonomy.taxeditor.bulkeditor.separator1"
+               visible="true">
+         </separator>
          <command
                commandId="eu.etaxonomy.taxeditor.bulkeditor.convertTeam2Person"
                label="%command.label.5"
             </visibleWhen>
          </command>
       </menuContribution>
+      <menuContribution
+            allPopups="false"
+            locationURI="popup:eu.etaxonomy.taxeditor.bulkeditor.view.referencingobjects">
+         <dynamic
+               class="eu.etaxonomy.taxeditor.view.CdmViewerContextMenu"
+               id="eu.etaxonomy.taxeditor.referencingObjectsView.cdmViewerContextMenu">
+         </dynamic>
+         <separator
+               name="eu.etaxonomy.taxeditor.bulkeditor.separator1">
+         </separator>
+      </menuContribution>
+      <menuContribution
+            allPopups="false"
+            locationURI="menu:eu.etaxonomy.taxeditor.menu.showView?after=eu.etaxonomy.taxeditor.store.showViewMenu.supplemental">
+         <command
+               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>
    <extension
          point="org.eclipse.ui.commands">
             name="%command.name.1">
          <commandParameter
                id="taxeditor-bulkeditor.commandParameter.inputType"
-               name="%commandParameter.name"
+               name="Bulk Editor Class"
                values="eu.etaxonomy.taxeditor.bulkeditor.input.BulkEditorInputTypeValues">
          </commandParameter>
       </command>
       </command>
       <command
             id="eu.etaxonomy.taxeditor.openReferencingObjectsView"
-            name="Open Referencing Objects View">
+            name="%command.name.OPEN_REFERENCING_OBJECTS_VIEW">
+      </command>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.bulkeditor.handler.defaultHandler.OpenBulkEditorForTaxonNodeHandler"
+            id="eu.etaxonomy.taxeditor.bulkeditor.openBulkEditorForTaxonNode"
+            name="%command.name.OPEN_BULK_EDITOR_FOR_TAXON_NODE">
+      </command>
+      <command
+            id="eu.etaxonomy.taxeditor.bulkeditor.openBulkEditorForIdentifiableEntity"
+            name="Open bulk editor for identifiable entity">
+         <commandParameter
+               id="eu.etaxonomy.taxeditor.bulkeditor.openBulkEditorForIdentifiableEntity.uuid"
+               name="Identifiable Entity UUID"
+               optional="true"
+               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"
             </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">
             commandId="eu.etaxonomy.taxeditor.bulkeditor.convertPerson2Team">
       </handler>
       <handler
-            class="eu.etaxonomy.taxeditor.handler.defaultHandler.OpenReferencingObjectsView"
-            commandId="eu.etaxonomy.taxeditor.openReferencingObjectsView">
+            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>
             name="%page.name.0">
       </page>
    </extension>
-   <extension
-         point="org.eclipse.ui.perspectiveExtensions">
-      <perspectiveExtension
-            targetID="*">
-         <showInPart
-               id="eu.etaxonomy.taxeditor.bulkeditor.view.referencingobjects"></showInPart>
-         <showInPart
-               id="eu.etaxonomy.taxeditor.view.detail">
-         </showInPart>
-      </perspectiveExtension>
-   </extension>
    <extension
          point="eu.etaxonomy.taxeditor.store.cdmViewer">
       <viewCommandMapping
             commandId="eu.etaxonomy.taxeditor.openReferencingObjectsView"
             selection="java.lang.Object"
-            viewerName="Referencing Objects View">
+            viewerName="%viewCommandMapping.viewerName.REFERENCING_OBJECTS_VIEW">
+      </viewCommandMapping>
+      <viewCommandMapping
+            commandId="eu.etaxonomy.taxeditor.bulkeditor.openBulkEditorForTaxonNode"
+            selection="eu.etaxonomy.cdm.model.taxon.TaxonNode"
+            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 -->