Add generic cdmViewer extension context menu to bulk editor
authorPatrick Plitzner <p.plitzner@bgbm.org>
Tue, 15 Dec 2015 07:30:21 +0000 (08:30 +0100)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Tue, 15 Dec 2015 07:30:21 +0000 (08:30 +0100)
 - add handler for opening referencing objects view

eu.etaxonomy.taxeditor.bulkeditor/plugin.xml
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/OpenReferencingObjectsView.java [new file with mode: 0644]

index 7c4d0d26851e78f3a5f88b421a40f7602e91035c..24fc80404cebb37b7fe004b72301720f5fa1336f 100644 (file)
                </reference>
             </visibleWhen>
          </command>
+         <dynamic
+               class="eu.etaxonomy.taxeditor.view.CdmViewerContextMenu"
+               id="eu.etaxonomy.taxeditor.bulkeditor.cdmViewerContextMenu">
+         </dynamic>
       </menuContribution>
    </extension>
    <extension
             class="eu.etaxonomy.taxeditor.bulkeditor.handler.ConvertPerson2TeamHandler"
             commandId="eu.etaxonomy.taxeditor.bulkeditor.convertPerson2Team">
       </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.handler.defaultHandler.OpenReferencingObjectsView"
+            commandId="eu.etaxonomy.taxeditor.openReferencingObjectsView">
+      </handler>
       
    </extension>
    <extension
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/OpenReferencingObjectsView.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/OpenReferencingObjectsView.java
new file mode 100644 (file)
index 0000000..88514b9
--- /dev/null
@@ -0,0 +1,16 @@
+package eu.etaxonomy.taxeditor.handler.defaultHandler;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
+
+public class OpenReferencingObjectsView extends AbstractHandler {
+
+    @Override
+    public Object execute(ExecutionEvent event) throws ExecutionException {
+        return AbstractUtility.showView("eu.etaxonomy.taxeditor.bulkeditor.view.referencingobjects");
+    }
+
+}