ref #6595 remove unused parameter
authorPatrick Plitzner <p.plitzner@bgbm.org>
Mon, 28 Aug 2017 09:35:40 +0000 (11:35 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Mon, 28 Aug 2017 09:53:33 +0000 (11:53 +0200)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/DeleteTaxonBaseHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteMisapplicationOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteSynonymOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteTaxonBaseOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteTaxonOperation.java
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteMisapplicationOperationTest.java
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteSynonymOperationTest.java

index 5194c7a99d61a14ad66ef653780cdff9df3d49f4..9878bd93b5966b7e9510d28ad9e99c2fa4a1a302 100644 (file)
@@ -13,7 +13,6 @@ import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.commands.IHandler;
 import org.eclipse.core.commands.common.NotDefinedException;
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.commands.IHandler;
 import org.eclipse.core.commands.common.NotDefinedException;
-import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.handlers.HandlerUtil;
 
 import eu.etaxonomy.cdm.api.service.DeleteResult;
 import org.eclipse.ui.handlers.HandlerUtil;
 
 import eu.etaxonomy.cdm.api.service.DeleteResult;
@@ -69,7 +68,6 @@ public class DeleteTaxonBaseHandler extends AbstractHandler implements IHandler,
                } catch (NotDefinedException e) {
                        MessagingUtils.error(getClass(), e);
                }
                } catch (NotDefinedException e) {
                        MessagingUtils.error(getClass(), e);
                }
-               IWorkbenchPage activePage = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();
                if (selectedElement instanceof TaxonBase){
                    if (((TaxonBase)selectedElement).getId() == 0){
                        if (selectedElement instanceof Taxon && ((Taxon) selectedElement).isMisapplication()) {
                if (selectedElement instanceof TaxonBase){
                    if (((TaxonBase)selectedElement).getId() == 0){
                        if (selectedElement instanceof Taxon && ((Taxon) selectedElement).isMisapplication()) {
@@ -91,7 +89,7 @@ public class DeleteTaxonBaseHandler extends AbstractHandler implements IHandler,
                    if(! DeleteConfiguratorDialog.openConfirmWithConfigurator(deleteConfig, HandlerUtil.getActiveShell(event), Messages.DeleteTaxonBaseHandler_CONFIRM_DELETION,  Messages.DeleteTaxonBaseHandler_REALLY_DELETE_SYNONYM)){
                           return ;
             }
                    if(! DeleteConfiguratorDialog.openConfirmWithConfigurator(deleteConfig, HandlerUtil.getActiveShell(event), Messages.DeleteTaxonBaseHandler_CONFIRM_DELETION,  Messages.DeleteTaxonBaseHandler_REALLY_DELETE_SYNONYM)){
                           return ;
             }
-                       operation = new DeleteSynonymOperation(commandName, editor.getUndoContext(), deleteConfig, activePage, editor.getTaxon(), (Synonym) selectedElement,this, editor, (ICdmEntitySessionEnabled)editor.getEditorInput());
+                       operation = new DeleteSynonymOperation(commandName, editor.getUndoContext(), deleteConfig, editor.getTaxon(), (Synonym) selectedElement,this, editor, (ICdmEntitySessionEnabled)editor.getEditorInput());
 
                }
                // misapplication
 
                }
                // misapplication
@@ -100,7 +98,7 @@ public class DeleteTaxonBaseHandler extends AbstractHandler implements IHandler,
                    if(! DeleteConfiguratorDialog.openConfirmWithConfigurator(deleteConfig, HandlerUtil.getActiveShell(event), Messages.DeleteTaxonBaseHandler_CONFIRM_DELETION,  Messages.DeleteTaxonBaseHandler_REALLY_DELETE_MISAPPLICATION)){
                        return ;
                    }
                    if(! DeleteConfiguratorDialog.openConfirmWithConfigurator(deleteConfig, HandlerUtil.getActiveShell(event), Messages.DeleteTaxonBaseHandler_CONFIRM_DELETION,  Messages.DeleteTaxonBaseHandler_REALLY_DELETE_MISAPPLICATION)){
                        return ;
                    }
-                       operation = new DeleteMisapplicationOperation(commandName, editor.getUndoContext(),  deleteConfig, activePage, editor.getTaxon(), (Taxon) selectedElement,this, editor, (ICdmEntitySessionEnabled)editor.getEditorInput());
+                       operation = new DeleteMisapplicationOperation(commandName, editor.getUndoContext(),  deleteConfig, editor.getTaxon(), (Taxon) selectedElement,this, editor, (ICdmEntitySessionEnabled)editor.getEditorInput());
                } else {
                        throw new IllegalArgumentException(Messages.DeleteTaxonBaseHandler_ELEMENT_MUST_BE_SYNONYM_MISAPP_CONCEPT);
                }
                } else {
                        throw new IllegalArgumentException(Messages.DeleteTaxonBaseHandler_ELEMENT_MUST_BE_SYNONYM_MISAPP_CONCEPT);
                }
index ab7253831c6f03d6a5992bf9ff1bd4eaa36eed79..028dcc587da63d89666a2495cab76ac2157c45ce 100644 (file)
@@ -51,10 +51,10 @@ public class DeleteMisapplicationOperation extends DeleteTaxonBaseOperation {
         * @param misapplication a {@link eu.etaxonomy.cdm.model.taxon.Taxon} object.
         * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
         */
         * @param misapplication a {@link eu.etaxonomy.cdm.model.taxon.Taxon} object.
         * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
         */
-       public DeleteMisapplicationOperation(String label, IUndoContext undoContext, TaxonBaseDeletionConfigurator configurator,IWorkbenchPage activePage,
+       public DeleteMisapplicationOperation(String label, IUndoContext undoContext, TaxonBaseDeletionConfigurator configurator,
             Taxon taxon, Taxon misapplication, IPostOperationEnabled postOperationEnabled, IConversationEnabled conversationEnabled,ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
                //super(label, undoContext, taxon, postOperationEnabled);
             Taxon taxon, Taxon misapplication, IPostOperationEnabled postOperationEnabled, IConversationEnabled conversationEnabled,ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
                //super(label, undoContext, taxon, postOperationEnabled);
-           super(label, undoContext, configurator, activePage, postOperationEnabled, conversationEnabled, cdmEntitySessionEnabled);
+           super(label, undoContext, configurator, postOperationEnabled, conversationEnabled, cdmEntitySessionEnabled);
                this.misapplication = misapplication;
                this.element = taxon;
        }
                this.misapplication = misapplication;
                this.element = taxon;
        }
index 13e5fc202bfdd4fddaafda2ca5a529bfc4d492c9..1285a4539e791cb25dd2daebd25d16fadd003668 100644 (file)
@@ -14,7 +14,6 @@ import org.eclipse.core.commands.operations.IUndoContext;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.ui.IWorkbenchPage;
 
 import eu.etaxonomy.cdm.api.application.ICdmRepository;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 
 import eu.etaxonomy.cdm.api.application.ICdmRepository;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
@@ -50,9 +49,9 @@ public class DeleteSynonymOperation extends DeleteTaxonBaseOperation {
         * @param synonym a {@link eu.etaxonomy.cdm.model.taxon.Synonym} object.
         * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
         */
         * @param synonym a {@link eu.etaxonomy.cdm.model.taxon.Synonym} object.
         * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
         */
-       public DeleteSynonymOperation(String label, IUndoContext undoContext, TaxonBaseDeletionConfigurator configurator,IWorkbenchPage activePage,
+       public DeleteSynonymOperation(String label, IUndoContext undoContext, TaxonBaseDeletionConfigurator configurator,
                        Taxon taxon, Synonym synonym, IPostOperationEnabled postOperationEnabled, IConversationEnabled conversationEnabled,ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
                        Taxon taxon, Synonym synonym, IPostOperationEnabled postOperationEnabled, IConversationEnabled conversationEnabled,ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
-               super(label, undoContext, configurator, activePage, postOperationEnabled, conversationEnabled, cdmEntitySessionEnabled);
+               super(label, undoContext, configurator, postOperationEnabled, conversationEnabled, cdmEntitySessionEnabled);
                this.synonym = synonym;
                this.element = taxon;
        }
                this.synonym = synonym;
                this.element = taxon;
        }
index a800d1abe8152b748e13b5e3e25066fc160a2a52..997a5b45f86a0f3489b112a43383ae0f143e9886 100644 (file)
@@ -5,7 +5,6 @@ import org.eclipse.core.commands.operations.IUndoContext;
 import org.eclipse.core.runtime.IAdaptable;\r
 import org.eclipse.core.runtime.IProgressMonitor;\r
 import org.eclipse.core.runtime.IStatus;\r
 import org.eclipse.core.runtime.IAdaptable;\r
 import org.eclipse.core.runtime.IProgressMonitor;\r
 import org.eclipse.core.runtime.IStatus;\r
-import org.eclipse.ui.IWorkbenchPage;\r
 \r
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;\r
 import eu.etaxonomy.cdm.api.service.DeleteResult;\r
 \r
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;\r
 import eu.etaxonomy.cdm.api.service.DeleteResult;\r
@@ -22,7 +21,6 @@ public class DeleteTaxonBaseOperation extends AbstractPersistentPostOperation {
        public DeleteTaxonBaseOperation(String label,\r
                IUndoContext undoContext,\r
                TaxonBaseDeletionConfigurator configurator,\r
        public DeleteTaxonBaseOperation(String label,\r
                IUndoContext undoContext,\r
                TaxonBaseDeletionConfigurator configurator,\r
-               IWorkbenchPage activePage,\r
                IPostOperationEnabled postOperationEnabled,\r
                IConversationEnabled conversationEnabled,\r
                ICdmEntitySessionEnabled cdmEntitySessionEnabled) {\r
                IPostOperationEnabled postOperationEnabled,\r
                IConversationEnabled conversationEnabled,\r
                ICdmEntitySessionEnabled cdmEntitySessionEnabled) {\r
index 434cc5756ea6d984c3f9ab29dd8e8d42071ab994..92a139266376264f3ff4edfeb4372cade1ee409c 100644 (file)
@@ -8,7 +8,6 @@ import org.eclipse.core.commands.operations.IUndoContext;
 import org.eclipse.core.runtime.IAdaptable;\r
 import org.eclipse.core.runtime.IProgressMonitor;\r
 import org.eclipse.core.runtime.IStatus;\r
 import org.eclipse.core.runtime.IAdaptable;\r
 import org.eclipse.core.runtime.IProgressMonitor;\r
 import org.eclipse.core.runtime.IStatus;\r
-import org.eclipse.ui.IWorkbenchPage;\r
 \r
 import eu.etaxonomy.cdm.api.application.ICdmRepository;\r
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;\r
 \r
 import eu.etaxonomy.cdm.api.application.ICdmRepository;\r
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;\r
@@ -30,11 +29,10 @@ public class DeleteTaxonOperation extends DeleteTaxonBaseOperation{
                        Taxon taxon,\r
                        TaxonDeletionConfigurator configurator,\r
                        Classification classification,\r
                        Taxon taxon,\r
                        TaxonDeletionConfigurator configurator,\r
                        Classification classification,\r
-                       IWorkbenchPage activePage,\r
                        IPostOperationEnabled postOperationEnabled,\r
                        IConversationEnabled conversationEnabled,\r
             ICdmEntitySessionEnabled cdmEntitySessionEnabled) {\r
                        IPostOperationEnabled postOperationEnabled,\r
                        IConversationEnabled conversationEnabled,\r
             ICdmEntitySessionEnabled cdmEntitySessionEnabled) {\r
-               super(label, undoContext, configurator, activePage, postOperationEnabled, conversationEnabled, cdmEntitySessionEnabled);\r
+               super(label, undoContext, configurator, postOperationEnabled, conversationEnabled, cdmEntitySessionEnabled);\r
                this.element = taxon;\r
 \r
                Set<TaxonNode> nodes = taxon.getTaxonNodes();\r
                this.element = taxon;\r
 \r
                Set<TaxonNode> nodes = taxon.getTaxonNodes();\r
index 4f57c79b53899fa30439b3227479a2f266a0e1c7..cac8a1c13e1ca1ae0a78bb0615cf13f07de65e53 100644 (file)
@@ -43,7 +43,7 @@ public class DeleteMisapplicationOperationTest extends AbstractTaxeditorOperatio
 
                taxon.addMisappliedName(misapplication, null, null);
 
 
                taxon.addMisappliedName(misapplication, null, null);
 
-               operation = new DeleteMisapplicationOperation("", undoContext, null, null, taxon, misapplication, postOperation,  null, null);
+               operation = new DeleteMisapplicationOperation("", undoContext, null, taxon, misapplication, postOperation,  null, null);
 
        }
 
 
        }
 
index a1e4fb8d459ec3652877318730c22f68251d4963..a34cb943841c64830c73f6556fdc1ae04a23c1ae 100644 (file)
@@ -45,7 +45,7 @@ public class DeleteSynonymOperationTest extends AbstractTaxeditorOperationTestBa
 
                taxon.addSynonym(synonym, synonymType);
 
 
                taxon.addSynonym(synonym, synonymType);
 
-               operation = new DeleteSynonymOperation("", undoContext, new SynonymDeletionConfigurator(), null, taxon,synonym, postOperation, null, null);
+               operation = new DeleteSynonymOperation("", undoContext, new SynonymDeletionConfigurator(), taxon,synonym, postOperation, null, null);
 
        }
 
 
        }