Disable default handler for opening referencing objects view to avoid
authorPatrick Plitzner <p.plitzner@bgbm.org>
Tue, 9 Aug 2016 11:35:42 +0000 (13:35 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Tue, 9 Aug 2016 11:35:42 +0000 (13:35 +0200)
that menu item showing up in every context

eu.etaxonomy.taxeditor.bulkeditor/plugin.xml
eu.etaxonomy.taxeditor.navigation/plugin.xml

index f72a7b25eb896ba15ad30bbd8d1844f702ce14bd..c8bd4f726752ff7b7dd004f16ce08af8a77cfeac 100644 (file)
             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>
                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"
index e34d01f06c54eb39fb7d00c6c73d0e16ebdaec00..2173e1efe33bd9235e25d3619df912e2b74173f8 100644 (file)
             </reference>
          </activeWhen>
       </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.handler.defaultHandler.OpenReferencingObjectsView"
+            commandId="eu.etaxonomy.taxeditor.openReferencingObjectsView">
+         <activeWhen>
+            <with
+                  variable="activePartId">
+               <equals
+                     value="eu.etaxonomy.taxeditor.navigation.navigator">
+               </equals>
+            </with>
+         </activeWhen>
+      </handler>
    </extension>