- added missing @Override
authorPatric Plitzner <p.plitzner@bgbm.org>
Tue, 19 Aug 2014 07:06:57 +0000 (07:06 +0000)
committerPatric Plitzner <p.plitzner@bgbm.org>
Tue, 19 Aug 2014 07:06:57 +0000 (07:06 +0000)
 - fixed use of static method

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/handler/CreateConceptRelationHandler.java

index 976aaa42b77cb9f3bda4ccc3775a01aaa4373937..d3aba2aa0f3ca0234c3a42f1c61541968c78341d 100644 (file)
@@ -1,22 +1,19 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* 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.editor.view.concept.handler;
 
-import org.apache.log4j.Level;
-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.core.commands.common.NotDefinedException;
-import org.eclipse.core.expressions.IEvaluationContext;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.swt.widgets.Event;
 import org.eclipse.ui.IWorkbenchPart;
@@ -27,6 +24,7 @@ import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.Page;
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
 import eu.etaxonomy.taxeditor.editor.view.concept.operation.CreateConceptRelationOperation;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.model.TaxonRelationshipTypeInverseContainer;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
@@ -41,43 +39,44 @@ import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonBaseSelectionDialog;
  * @version 1.0
  */
 public class CreateConceptRelationHandler extends AbstractHandler {
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
         */
        /** {@inheritDoc} */
-       public Object execute(ExecutionEvent event) throws ExecutionException {
+       @Override
+    public Object execute(ExecutionEvent event) throws ExecutionException {
                TaxonNameEditor editor = (TaxonNameEditor) EditorUtil.getActiveEditorPage(
                                Page.NAME);
-               
+
                Taxon taxonToBeFiltered = editor.getTaxon();
-               
-               /* we need to get the activePart before calling TaxonBaseSelectionDialog.selectTaxon(), otherwise the 
+
+               /* we need to get the activePart before calling TaxonBaseSelectionDialog.selectTaxon(), otherwise the
                 * the variable of the parent applicationContext in event are overwritten during this method call
                 * this is Linux specific bugfix see: #2685 ([LINUX] Editing concept relationships does not work under linux)
                 */
                IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
 
                Taxon relatedConcept = TaxonBaseSelectionDialog.selectTaxon(HandlerUtil.getActiveShell(event), editor.getConversationHolder(), taxonToBeFiltered);
-                                       
-               
+
+
                if(relatedConcept == null){
                        return Status.CANCEL_STATUS;
                }
-               
+
                TaxonRelationshipTypeInverseContainer typeInverseContainer = (TaxonRelationshipTypeInverseContainer) ((Event)event.getTrigger()).data;
-               
+
 
                IPostOperationEnabled postOperationEnabled = (activePart instanceof IPostOperationEnabled) ? (IPostOperationEnabled) activePart : null;
-               
+
                try {
-                       AbstractPostOperation operation = new CreateConceptRelationOperation(event.getCommand().getName(), 
+                       AbstractPostOperation operation = new CreateConceptRelationOperation(event.getCommand().getName(),
                                        editor.getUndoContext(), editor.getTaxon(), relatedConcept, typeInverseContainer, postOperationEnabled);
-                       EditorUtil.executeOperation(operation);
+                       AbstractUtility.executeOperation(operation);
                } catch (NotDefinedException e) {
                        MessagingUtils.warn(getClass(), "Command name not set");
                }
-               
+
                return null;
        }
 }