taxeditor-bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/derivedunit/handler/AddDerivedUnitMediaHandler.java -text
taxeditor-bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/derivedunit/handler/AddFieldObjectMediaHandler.java -text
taxeditor-bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/derivedunit/operation/AddDerivedUnitFacadeMediaOperation.java -text
+taxeditor-bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/DeleteHandler.java -text
taxeditor-bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/MergeGroupHandler.java -text
taxeditor-bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/OpenBulkEditorHandler.java -text
taxeditor-bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/RemoveMergeCandidateHandler.java -text
</menuContribution>\r
<menuContribution\r
locationURI="popup:#BulkEditorContext">\r
+ <menu\r
+ label="New">\r
+ <dynamic\r
+ class="eu.etaxonomy.taxeditor.bulkeditor.command.DynamicNewObjectMenu"\r
+ id="eu.etaxonomy.taxeditor.bulkeditor.dynamicNewMenu">\r
+ </dynamic>\r
+ </menu>\r
<separator\r
name="taxeditor-bulkeditor.separator1"\r
visible="true">\r
</separator>\r
+ <command\r
+ commandId="org.eclipse.ui.views.showView"\r
+ label="Show Details"\r
+ style="push">\r
+ <parameter\r
+ name="org.eclipse.ui.views.showView.viewId"\r
+ value="eu.etaxonomy.taxeditor.editor.forms.detailsView">\r
+ </parameter>\r
+ </command>\r
+ <command\r
+ commandId="bulkeditor.commands.referencingobjects"\r
+ label="Show Referencing Objects"\r
+ style="push">\r
+ </command>\r
+ <separator\r
+ name="taxeditor-bulkeditor.separator4"\r
+ visible="true">\r
+ </separator>\r
<command\r
commandId="bulkeditor.commands.setmergetarget"\r
label="Set Current Line as Target for Duplicate Removal"\r
name="taxeditor-bulkeditor.separator2"\r
visible="true">\r
</separator>\r
- <command\r
- commandId="bulkeditor.commands.referencingobjects"\r
- label="Show Referencing Objects"\r
- style="push">\r
- </command>\r
- <command\r
- commandId="org.eclipse.ui.views.showView"\r
- label="Show Details"\r
- style="push">\r
- <parameter\r
- name="org.eclipse.ui.views.showView.viewId"\r
- value="eu.etaxonomy.taxeditor.editor.forms.detailsView">\r
- </parameter>\r
- </command>\r
- <separator\r
- name="taxeditor-bulkeditor.separator3"\r
- visible="true">\r
- </separator>\r
- <menu\r
- label="New">\r
- <dynamic\r
- class="eu.etaxonomy.taxeditor.bulkeditor.command.DynamicNewObjectMenu"\r
- id="eu.etaxonomy.taxeditor.bulkeditor.dynamicNewMenu">\r
- </dynamic>\r
- </menu>\r
<menu\r
label="Set Marker Type">\r
<dynamic\r
id="eu.etaxonomy.taxeditor.bulkeditor.dynamicMarkerTypeEditingMenu">\r
</dynamic>\r
</menu>\r
+ <separator\r
+ name="taxeditor-bulkeditor.separator3"\r
+ visible="true">\r
+ </separator>\r
+ <command\r
+ commandId="org.eclipse.ui.edit.delete"\r
+ label="Delete"\r
+ style="push">\r
+ </command>\r
</menuContribution>\r
</extension>\r
<extension\r
point="org.eclipse.ui.views">\r
<view\r
class="eu.etaxonomy.taxeditor.bulkeditor.referencingobjects.ReferencingObjectsView"\r
- id="eu.etaxonomy.taxeditor.bulkeditor.referencingobjectsview"\r
+ id="eu.etaxonomy.taxeditor.bulkeditor.view.referencingobjects"\r
name="Referencing Objects"\r
restorable="false">\r
</view>\r
</with>\r
</activeWhen>\r
</handler>\r
+ <handler\r
+ class="eu.etaxonomy.taxeditor.bulkeditor.handler.DeleteHandler"\r
+ commandId="org.eclipse.ui.edit.delete">\r
+ <activeWhen>\r
+ <with\r
+ variable="activePartId">\r
+ <equals\r
+ value="bulkeditor.editor">\r
+ </equals>\r
+ </with>\r
+ </activeWhen>\r
+ </handler>\r
</extension>\r
<extension\r
point="org.eclipse.ui.preferencePages">\r
properties="isDerivedUnitEditor"\r
type="eu.etaxonomy.taxeditor.bulkeditor.BulkEditor">\r
</propertyTester>\r
+ </extension>\r
+ <extension\r
+ point="org.eclipse.ui.perspectiveExtensions">\r
+ <perspectiveExtension\r
+ targetID="*">\r
+ <showInPart\r
+ id="eu.etaxonomy.taxeditor.bulkeditor.view.referencingobjects"></showInPart>\r
+ <showInPart\r
+ id="eu.etaxonomy.taxeditor.view.detail">\r
+ </showInPart>\r
+ </perspectiveExtension>\r
</extension>
<!-- start set marker -->\r
\r
package eu.etaxonomy.taxeditor.bulkeditor;
+import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.MessageDialogWithToggle;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.texteditor.ITextEditorActionConstants;
import eu.etaxonomy.taxeditor.annotatedlineeditor.AnnotatedLineDocumentProvider;
import eu.etaxonomy.taxeditor.annotatedlineeditor.AnnotatedLineEditor;
public AbstractBulkEditorInput getEditorInput() {
return (AbstractBulkEditorInput) super.getEditorInput();
}
+
+ protected void editorContextMenuAboutToShow(IMenuManager menu) {
+ super.editorContextMenuAboutToShow(menu);
+ menu.remove(ITextEditorActionConstants.SHIFT_RIGHT);
+ menu.remove(ITextEditorActionConstants.SHIFT_LEFT);
+ menu.remove(ITextEditorActionConstants.CONTEXT_PREFERENCES);
+
+ IMenuManager showInMenu = menu.findMenuUsingPath("viewsShowIn");
+ System.out.println(showInMenu);
+ }
}
--- /dev/null
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.bulkeditor.handler;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+
+/**
+ * @author n.hoffmann
+ * @created Mar 11, 2011
+ * @version 1.0
+ */
+public class DeleteHandler extends AbstractHandler {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
.getLogger(ReferencingObjectsView.class);
/** Constant <code>ID="eu.etaxonomy.taxeditor.bulkeditor.refer"{trunked}</code> */
- public static final String ID = "eu.etaxonomy.taxeditor.bulkeditor.referencingobjectsview";
+ public static final String ID = "eu.etaxonomy.taxeditor.bulkeditor.view.referencingobjects";
private TableViewer viewer;
NavigationUtil.error(NavigationUtil.class, "Error opening the editor", e);
}
}
+ }else if(selectedObject instanceof ICdmBase){
+ openEditor((ICdmBase) selectedObject);
+ }else{
+ NavigationUtil.error(NavigationUtil.class, new IllegalArgumentException("Selected object is not supported: " + selectedObject));
}
}