commit 8d6b7efd1c96489398a0e41dbd42d5fbe192ffeb
Author: Patrick Plitzner <p.plitzner@bgbm.org>
Date:   Fri May 4 17:40:40 2018 +0200

    ref #6913 Remove remaining handlers

diff --git a/eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/OpenExternalHelpHandler.java b/eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/OpenExternalHelpHandler.java
deleted file mode 100644
index d4b1a3493..000000000
--- a/eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/OpenExternalHelpHandler.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
-* 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;
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.apache.log4j.Logger;
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-
-import eu.etaxonomy.taxeditor.workbench.WorkbenchUtility;
-
-/**
- * <p>OpenExternalHelpHandler class.</p>
- *
- * @author p.ciardelli
- * @created 04.09.2009
- * @version 1.0
- */
-public class OpenExternalHelpHandler extends AbstractHandler {
-	private static final Logger logger = Logger.getLogger(OpenExternalHelpHandler.class);
-
-	/** {@inheritDoc} */
-	@Override
-    public Object execute(ExecutionEvent event) throws ExecutionException {
-		String url = "https://cybertaxonomy.eu/download/taxeditor/stable/EDITTaxonomicEditor-UserManual.pdf";
-
-		try {
-            WorkbenchUtility.openWebpage(new URL(url));
-        } catch (IOException| RuntimeException e) {
-            logger.error(e);
-            throw new RuntimeException(e);
-        }
-
-		return null;
-	}
-}
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/EditInXper2Handler.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/EditInXper2Handler.java
deleted file mode 100644
index 9e998fd1e..000000000
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/EditInXper2Handler.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 
- */
-package eu.etaxonomy.taxeditor.editor.view.descriptive.operation;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-
-import eu.etaxonomy.taxeditor.model.MessagingUtils;
-
-/**
- * @author n.hoffmann
- *
- */
-public class EditInXper2Handler extends AbstractHandler {
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
-	 */
-	@Override
-	public Object execute(ExecutionEvent event) throws ExecutionException {
-		MessagingUtils.warningDialog("Operation not supported yet", getClass(), "This operation is not supported yet."); //$NON-NLS-1$ //$NON-NLS-2$
-		return null;
-	}
-
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenHandler.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenHandler.java
deleted file mode 100644
index e6e8dc6d8..000000000
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenHandler.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package eu.etaxonomy.taxeditor.handler;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-import eu.etaxonomy.taxeditor.view.CdmViewerChooser;
-
-/**
- * Opens the (first) currently selected element in a viewer. Opens a list of
- * possible viewers if more than one are registered for this element.
- *
- * @author pplitzner
- * @date Jul 6, 2015
- *
- */
-public class OpenHandler extends AbstractHandler {
-
-    @Override
-    public Object execute(ExecutionEvent event) throws ExecutionException {
-        ISelection currentSelection = HandlerUtil.getCurrentSelection(event);
-        if(currentSelection instanceof IStructuredSelection){
-            Object firstElement = ((IStructuredSelection) currentSelection).getFirstElement();
-            CdmViewerChooser viewerChooser = new CdmViewerChooser(HandlerUtil.getActiveShell(event));
-            viewerChooser.chooseViewer(firstElement);
-        }
-        return null;
-    }
-
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenInspectSessionsHandler.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenInspectSessionsHandler.java
deleted file mode 100644
index 1cab455cd..000000000
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenInspectSessionsHandler.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
-* Copyright (C) 2015 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.handler;
-
-import java.util.Collection;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.swt.SWT;
-
-import eu.etaxonomy.cdm.model.common.CdmBase;
-import eu.etaxonomy.taxeditor.model.AbstractUtility;
-import eu.etaxonomy.taxeditor.model.MessagingUtils;
-import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
-import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.view.sessions.InspectSessionsDialog;
-
-/**
- * @author cmathew
- * @date 18 Feb 2015
- *
- */
-public class OpenInspectSessionsHandler extends AbstractHandler implements IHandler {
-
-
-    /* (non-Javadoc)
-     * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
-     */
-    /** {@inheritDoc} */
-    @Override
-    public Object execute(ExecutionEvent event) throws ExecutionException {
-
-        Object principal = CdmStore.getCurrentAuthentiation().getPrincipal();
-
-        ICdmEntitySession activeSession = CdmStore.getCurrentSessionManager().getActiveSession();
-
-        if(activeSession == null) {
-            MessagingUtils.warningDialog("No Active Session", this, "Active Session is null");
-        } else {
-            Collection<CdmBase> rootEntities = activeSession.getRootEntities();
-            if(rootEntities == null || rootEntities.isEmpty()) {
-                MessagingUtils.warningDialog("No Root Entities", this, "No root entities to inspect");
-            } else {
-                InspectSessionsDialog dialog = new InspectSessionsDialog(AbstractUtility.getShell(), SWT.NONE);
-                dialog.open();
-            }
-
-        }
-
-        return null;
-
-    }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java
index bd5461b44..ee8102c73 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java
@@ -70,7 +70,6 @@ import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IFeedbackGenerator;
 import eu.etaxonomy.taxeditor.operation.IPostMoniteredOperationEnabled;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
-import eu.etaxonomy.taxeditor.operation.RemotingCdmHandler;
 import eu.etaxonomy.taxeditor.operation.e4.RemotingCdmHandlerE4;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
@@ -172,11 +171,7 @@ public abstract class AbstractUtility {
         return executeOperation_internal(operation, handler, sync);
     }
 
-    public static IStatus executeOperation(final AbstractOperation operation, final RemotingCdmHandler handler, UISynchronize sync) {
-        return executeOperation_internal(operation, handler, sync);
-    }
-
-    private static IStatus executeOperation_internal(final AbstractOperation operation, final Object handler,
+    private static IStatus executeOperation_internal(final AbstractOperation operation, final RemotingCdmHandlerE4 handler,
             UISynchronize sync) {
         if (getOperationHistory() == null) {
             throw new IllegalArgumentException(
@@ -196,12 +191,7 @@ public abstract class AbstractUtility {
                     operation.addContext(IOperationHistory.GLOBAL_UNDO_CONTEXT);
                     status = operation.execute(monitor,
                             uiInfoAdapter);
-                    if(handler instanceof RemotingCdmHandler) {
-                        ((RemotingCdmHandler) handler).postOperation(status);
-                    }
-                    else if(handler instanceof RemotingCdmHandlerE4) {
-                        ((RemotingCdmHandlerE4) handler).postOperation(status);
-                    }
+                    handler.postOperation(status);
                 } catch (ExecutionException e) {
                     MessagingUtils.operationDialog(AbstractUtility.class, e, TaxeditorStorePlugin.PLUGIN_ID, operationlabel, null);
                 } finally {
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/RemotingCdmHandler.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/RemotingCdmHandler.java
deleted file mode 100644
index 7686ec857..000000000
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/RemotingCdmHandler.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
-* Copyright (C) 2015 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.operation;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.operations.AbstractOperation;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.ErrorDialog;
-
-import eu.etaxonomy.taxeditor.model.MessagingUtils;
-
-/**
- * @author cmathew
- * @date 16 Jun 2015
- *
- */
-public abstract class RemotingCdmHandler extends AbstractHandler {
-
-    private final String label;
-
-    public RemotingCdmHandler(String label) {
-        this.label = label;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
-     */
-    @Override
-    public Object execute(ExecutionEvent event) throws ExecutionException {
-        IStatus allowStatus = allowOperations(event);
-        if(allowStatus.isOK()) {
-            AbstractOperation op = prepareOperation(event);
-            if(op != null) {
-//                AbstractUtility.executeOperation(op, this);
-            }
-        } else if(allowStatus.getSeverity() == IStatus.ERROR ||
-                allowStatus.getSeverity() == IStatus.WARNING ||
-                allowStatus.getSeverity() == IStatus.INFO) {
-            MessagingUtils.warningDialog("Can not perform " + label, event.getTrigger(), allowStatus);
-        }
-        return null;
-    }
-
-    public void postOperation(IStatus status) {
-
-        switch(status.getSeverity()) {
-        case IStatus.WARNING:
-            ErrorDialog.openError(null, "Operation successful but with warnings", null, status);
-            break;
-        case IStatus.ERROR:
-            ErrorDialog.openError(null, "Error executing operation", null, status);
-            break;
-        default:
-        }
-
-        onComplete();
-    }
-
-    public abstract IStatus allowOperations(ExecutionEvent event);
-
-    public abstract AbstractOperation prepareOperation(ExecutionEvent event);
-
-    public abstract void onComplete();
-
-}
