Cleanup
authorAndreas Müller <a.mueller@bgbm.org>
Mon, 14 Nov 2016 09:56:33 +0000 (10:56 +0100)
committerAndreas Müller <a.mueller@bgbm.org>
Mon, 14 Nov 2016 09:56:33 +0000 (10:56 +0100)
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TreeNodeDropAdapter.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/MoveTaxonHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/MoveTaxonOperation.java

index d01a593..8649638 100644 (file)
@@ -1,4 +1,3 @@
-// $Id$
 /**
 * Copyright (C) 2015 EDIT
 * European Distributed Institute of Taxonomy
@@ -45,21 +44,21 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  *
  * @author k.luther
  * @date 02.06.2015
- * @version 1.0
  */
 public class TreeNodeDropAdapter extends ViewerDropAdapter implements IPostOperationEnabled {
 
+       private static final Logger logger = Logger.getLogger(TreeNodeDropAdapter.class);
+
+       private final TaxonNavigatorViewer navigatorViewer;
+       
        /**
         * @param viewer
         */
        protected TreeNodeDropAdapter(TaxonNavigatorViewer navigatorViewer) {
                super(navigatorViewer);
                this.navigatorViewer = navigatorViewer;
-
        }
 
-       private final TaxonNavigatorViewer navigatorViewer;
-       private static final Logger logger = Logger.getLogger(TreeNodeDropAdapter.class);
 
        /** Constant <code>ID="eu.etaxonomy.taxeditor.navigation.navig"{trunked}</code> */
        public static final String ID = "eu.etaxonomy.taxeditor.navigation.navigator.dropassistant"; //$NON-NLS-1$
@@ -71,10 +70,6 @@ public class TreeNodeDropAdapter extends ViewerDropAdapter implements IPostOpera
        }
 
 
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.navigator.CommonDropAdapterAssistant#handleDrop(org.eclipse.ui.navigator.CommonDropAdapter, org.eclipse.swt.dnd.DropTargetEvent, java.lang.Object)
-        */
        /** {@inheritDoc} */
        @Override
        public boolean performDrop(Object target) {
@@ -107,7 +102,7 @@ public class TreeNodeDropAdapter extends ViewerDropAdapter implements IPostOpera
                ISelection selection = LocalSelectionTransfer.getTransfer().getSelection();
                if (selection instanceof TreeSelection) {
 
-                       Iterator selectionIterator = ((TreeSelection) selection).iterator();
+                       Iterator<?> selectionIterator = ((TreeSelection) selection).iterator();
 
                        while (selectionIterator.hasNext()){
                                Object object = selectionIterator.next();
@@ -120,9 +115,6 @@ public class TreeNodeDropAdapter extends ViewerDropAdapter implements IPostOpera
                return taxonNodes.size() > 0 ? taxonNodes : null;
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.navigator.CommonDropAdapter#validateDrop(java.lang.Object, int, org.eclipse.swt.dnd.TransferData)
-        */
        /** {@inheritDoc} */
        @Override
        public boolean validateDrop(Object target, int operation,
@@ -209,7 +201,7 @@ public class TreeNodeDropAdapter extends ViewerDropAdapter implements IPostOpera
                                return false;
                        }
 
-                       AbstractPostOperation operation = new MoveTaxonOperation
+                       AbstractPostOperation<?> operation = new MoveTaxonOperation
                                        ("Move Taxon", workspaceUndoContext, uuids, targetITaxonTreeNode, this, taxonNavigator, MovingType.CHILD);
                        NavigationUtil.executeOperation(operation);
 
@@ -227,7 +219,7 @@ public class TreeNodeDropAdapter extends ViewerDropAdapter implements IPostOpera
                                        return false;
                                }
 
-                               AbstractPostOperation operation = new MoveTaxonOperation
+                               AbstractPostOperation<?> operation = new MoveTaxonOperation
                                                ("Move Taxon", workspaceUndoContext, uuids, targetITaxonTreeNode, this, taxonNavigator, MovingType.CHILD);
                                NavigationUtil.executeOperation(operation);
 
@@ -241,7 +233,7 @@ public class TreeNodeDropAdapter extends ViewerDropAdapter implements IPostOpera
                                }
                                TaxonNode targetNode = (TaxonNode) targetITaxonTreeNode;
 
-                               AbstractPostOperation operation = new MoveTaxonOperation
+                               AbstractPostOperation<?> operation = new MoveTaxonOperation
                                                ("Move Taxon", workspaceUndoContext, uuids, targetNode, this, taxonNavigator, MovingType.PREVIOUS);
                                NavigationUtil.executeOperation(operation);
 
index 30f7ab5..fe246ab 100644 (file)
@@ -115,9 +115,6 @@ public class MoveTaxonHandler extends AbstractHandler implements IPostOperationE
                return null;
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.operations.IPostOperationEnabled#postOperation(eu.etaxonomy.cdm.model.common.CdmBase)
-        */
        /** {@inheritDoc} */
        @Override
     public boolean postOperation(CdmBase objectAffectedByOperation) {
index ecd062b..1120e70 100644 (file)
@@ -75,9 +75,6 @@ public class MoveTaxonOperation extends AbstractPersistentPostOperation {
                //this.parentNode = taxonNode.getParent();
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
-        */
        /** {@inheritDoc} */
        @Override
        public IStatus execute(IProgressMonitor monitor, IAdaptable info)
@@ -110,9 +107,6 @@ public class MoveTaxonOperation extends AbstractPersistentPostOperation {
                return postExecute(null);
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
-        */
        /** {@inheritDoc} */
        @Override
        public IStatus redo(IProgressMonitor monitor, IAdaptable info)
@@ -120,9 +114,6 @@ public class MoveTaxonOperation extends AbstractPersistentPostOperation {
                return execute(monitor, info);
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
-        */
        /** {@inheritDoc} */
        @Override
        public IStatus undo(IProgressMonitor monitor, IAdaptable info)