There now exists a dummy delete entry in the bulk editors context menu. It is also...
authorn.hoffmann <n.hoffmann@localhost>
Fri, 11 Mar 2011 17:26:46 +0000 (17:26 +0000)
committern.hoffmann <n.hoffmann@localhost>
Fri, 11 Mar 2011 17:26:46 +0000 (17:26 +0000)
.gitattributes
taxeditor-bulkeditor/plugin.xml
taxeditor-bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditor.java
taxeditor-bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/DeleteHandler.java
taxeditor-bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/ShowReferencingObjectsHandler.java [deleted file]
taxeditor-editor/plugin.xml
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptiveViewPart.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/handler/MoveDescriptionElementsHandler.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/MediaViewPart.java
taxeditor-navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/NavigationUtil.java
taxeditor-navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/EditHandler.java

index 5d3a0dd98fe2518996c1beeb60090e74717213f9..3eecc7c15640f163422beb16f55267f37b339ac7 100644 (file)
@@ -100,7 +100,6 @@ taxeditor-bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/Rem
 taxeditor-bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/SetMarkerFlagHandler.java -text
 taxeditor-bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/SetMergeCandidateHandler.java -text
 taxeditor-bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/SetMergeTargetHandler.java -text
-taxeditor-bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/ShowReferencingObjectsHandler.java -text
 taxeditor-bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/AbstractBulkEditorInput.java -text
 taxeditor-bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/AgentEditorInput.java -text
 taxeditor-bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/GroupEditorInput.java -text
index 21004cd3d86dd3e4b2d825e44fea656569538725..45d1fd3fdb92aee18f7d2110d8a5895fdb5d7ee9 100644 (file)
                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
             id="bulkeditor.commands.setmergetarget"\r
             name="Set as Target for Group Merge">\r
       </command>\r
-      <command\r
-            defaultHandler="eu.etaxonomy.taxeditor.bulkeditor.handler.ShowReferencingObjectsHandler"\r
-            id="bulkeditor.commands.referencingobjects"\r
-            name="Show Referencing Objects">\r
-      </command>\r
       <command\r
             defaultHandler="eu.etaxonomy.taxeditor.bulkeditor.handler.OpenBulkEditorHandler"\r
             id="taxeditor-bulkeditor.dynamicopenmenu"\r
             commandId="org.eclipse.ui.edit.delete">\r
          <activeWhen>\r
             <with\r
-                  variable="activePartId">\r
-               <equals\r
-                     value="bulkeditor.editor">\r
-               </equals>\r
+                  variable="selection">\r
+               <instanceof\r
+                     value="eu.etaxonomy.taxeditor.model.LineSelection">\r
+               </instanceof>\r
             </with>\r
          </activeWhen>\r
       </handler>\r
index 3f543dcbd7639d4fadf28a8e0c1be6b7e3f6d90e..77869dfcdd4a451a305f15dc395cbeaf98e379a9 100644 (file)
@@ -298,8 +298,5 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
                menu.remove(ITextEditorActionConstants.SHIFT_RIGHT);
                menu.remove(ITextEditorActionConstants.SHIFT_LEFT);
                menu.remove(ITextEditorActionConstants.CONTEXT_PREFERENCES);
-
-               IMenuManager showInMenu = menu.findMenuUsingPath("viewsShowIn");
-               System.out.println(showInMenu);
        }
 }
index 4433592846d96ecc9c46110a182b24efda1fe5d4..560b9dfc15e6483d7450a3415a26b219620e25de 100644 (file)
@@ -14,6 +14,8 @@ import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
 
+import eu.etaxonomy.taxeditor.bulkeditor.BulkEditorUtil;
+
 /**
  * @author n.hoffmann
  * @created Mar 11, 2011
@@ -26,7 +28,7 @@ public class DeleteHandler extends AbstractHandler {
         */
        @Override
        public Object execute(ExecutionEvent event) throws ExecutionException {
-               // TODO Auto-generated method stub
+               BulkEditorUtil.warningDialog("Not implemented yet", getClass(), "Delete was not implemented yet.");
                return null;
        }
 
diff --git a/taxeditor-bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/ShowReferencingObjectsHandler.java b/taxeditor-bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/ShowReferencingObjectsHandler.java
deleted file mode 100644 (file)
index 43d612f..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-// $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.apache.log4j.Logger;
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-import eu.etaxonomy.taxeditor.bulkeditor.referencingobjects.ReferencingObjectsView;
-
-/**
- * <p>ShowReferencingObjectsHandler class.</p>
- *
- * @author p.ciardelli
- * @created 08.07.2009
- * @version 1.0
- */
-public class ShowReferencingObjectsHandler extends AbstractHandler {
-       private static final Logger logger = Logger
-                       .getLogger(ShowReferencingObjectsHandler.class);
-
-       /* (non-Javadoc)
-        * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
-        */
-       /** {@inheritDoc} */
-       public Object execute(ExecutionEvent event) throws ExecutionException {
-               try {
-                       ReferencingObjectsView view = (ReferencingObjectsView) HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().
-                                               showView(ReferencingObjectsView.ID);
-//                     view.updateReferencingObjects();
-               } catch (PartInitException e) {
-                       logger.error("PartInitException when updating referncing objects view", e);
-               }
-               return null;
-       }
-
-}
index 4f506c9cda8be9e37b53f1a81b4e917b0c6e36d9..bfbd8d93ef5dfc2be8f8bfc4382293a42e2647f0 100644 (file)
             class="eu.etaxonomy.taxeditor.editor.name.handler.DeleteTaxonBaseHandler"
             commandId="org.eclipse.ui.edit.delete">
          <activeWhen>
-            <with
-                  variable="activePartId">
-               <equals
-                     value="eu.etaxonomy.taxeditor.editor.taxon.name">
-               </equals>
-            </with>
+            <and>
+               <reference
+                     definitionId="isTaxonBase">
+               </reference>
+               <not>
+                  <reference
+                        definitionId="isAcceptedTaxon">
+                  </reference>
+               </not>
+            </and>
          </activeWhen>
       </handler>
       <handler
             class="eu.etaxonomy.taxeditor.editor.view.descriptive.handler.DeleteHandler"
             commandId="org.eclipse.ui.edit.delete">
-               <with
-                  variable="activePartId">
-               <equals
-                     value="eu.etaxonomy.taxeditor.editor.view.descriptive">
-               </equals>
-            </with>
+          <activeWhen>
+             <with
+                   variable="activePartId">
+                <equals
+                      value="eu.etaxonomy.taxeditor.editor.view.descriptive">
+                </equals>
+             </with>
+          </activeWhen>
       </handler>
       <handler
             class="eu.etaxonomy.taxeditor.editor.key.polytomous.handler.DeleteNodeHandler"
index 73c5753c2990af05eebace2aa271284f4af59aa5..7c405157db5f188ba35c7f1306ae77bf838d49d3 100644 (file)
@@ -76,7 +76,8 @@ public class DescriptiveViewPart extends AbstractCdmEditorViewPart implements IP
        @Override
        public void createViewer(Composite parent) {
                
-               viewer = new TreeViewer(new Tree(parent, SWT.NULL));
+               viewer = new TreeViewer(new Tree(parent, SWT.MULTI | SWT.H_SCROLL
+                               | SWT.V_SCROLL | SWT.FULL_SELECTION));
                                
                viewer.setContentProvider(new DescriptiveContentProvider(featureNodeContainerCache));           
                viewer.setLabelProvider(new DescriptiveLabelProvider());
index f83ff5ca6b84274b820a5bc47db59b285407ead9..1d27ca0fce60331335e958bc7d4e795cb45212fc 100644 (file)
@@ -50,7 +50,7 @@ public class MoveDescriptionElementsHandler extends AbstractHandler {
                
 //             ConversationHolder conversation = CdmStore.createConversation();
                
-               ISelection selection = HandlerUtil.getActiveMenuSelection(event);
+               ISelection selection = HandlerUtil.getCurrentSelection(event);
                
                if(selection instanceof IStructuredSelection){
 
index a512e5ac9bb47a2f642310fb1967383be80fbd30..d31371ff2b85847db8f3f4e4de74a23ba5b55af2 100644 (file)
@@ -56,7 +56,8 @@ public class MediaViewPart extends AbstractCdmEditorViewPart implements IPartCon
        @Override
        public void createViewer(Composite parent) {
                
-               viewer = new TreeViewer(new Tree(parent, SWT.NULL));
+               viewer = new TreeViewer(new Tree(parent, SWT.MULTI | SWT.H_SCROLL
+                               | SWT.V_SCROLL | SWT.FULL_SELECTION));
                
                viewer.setContentProvider(new MediaContentProvider());
                viewer.setLabelProvider(new MediaLabelProvider());
index 354448c372c94c0d8f22c7bf12b38a38c26cf1cb..5a76457d792e5541d54782cc2a43a5fc849c2e9e 100644 (file)
@@ -262,7 +262,7 @@ public class NavigationUtil extends AbstractUtility{
                                        " This case is not handled yet by the software.");
                }else if(acceptedTaxa.size() == 0){
                        // this is an undesired state
-                       warningDialog("Incorrect state", NavigationUtil.class, "The accepted taxon is not in a taxonomic view. This should not have happened.");
+                       warningDialog("Not implemented yet", NavigationUtil.class, "This taxon is not connected to a classification. Currently editing of such taxa is not supported yet.");
                }
        }
 
index 1abd3c415682f1172b0e1a508d78cb7d15818be8..4b2528db67e7d91968f4a3eda61f8ad158eaa75f 100644 (file)
@@ -44,7 +44,7 @@ public class EditHandler extends AbstractHandler implements IHandler{
        /** {@inheritDoc} */
        public Object execute(ExecutionEvent event) throws ExecutionException {
        
-               ISelection selection = HandlerUtil.getCurrentSelection(event);//navigator.getSelection();
+               ISelection selection = HandlerUtil.getCurrentSelection(event);
                
                if(selection instanceof StructuredSelection){
                        final StructuredSelection structuredSelection = (StructuredSelection) selection;