commit 2d137e2c4484fb5d3502b1dc0384bea25653df8e
Author: Patrick Plitzner <p.plitzner@bgbm.org>
Date:   Mon Oct 16 08:50:42 2017 +0200

    ref #6913 Remove dependency to WorkbenchWindow from utility class

diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/SetPublishFlagForSubtreeHandlerE4.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/SetPublishFlagForSubtreeHandlerE4.java
index 66384bd89..6cab818a8 100755
--- a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/SetPublishFlagForSubtreeHandlerE4.java
+++ b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/SetPublishFlagForSubtreeHandlerE4.java
@@ -27,7 +27,6 @@ import org.eclipse.swt.widgets.Shell;
 import eu.etaxonomy.cdm.api.service.config.PublishForSubtreeConfigurator;
 import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
-import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigatorLabels;
 import eu.etaxonomy.taxeditor.navigation.navigator.operation.SetPublishForSubtreeOperation;
 import eu.etaxonomy.taxeditor.operation.e4.RemotingCdmHandlerE4;
@@ -94,7 +93,7 @@ public class SetPublishFlagForSubtreeHandlerE4 extends RemotingCdmHandlerE4 {
         configurator = new PublishForSubtreeConfigurator(taxonNode.getUuid());
         SetPublishForSubtreeWizard wizard = new SetPublishForSubtreeWizard(configurator);
 
-        WizardDialog dialog = new WizardDialog(AbstractUtility.getShell(), wizard);
+        WizardDialog dialog = new WizardDialog(shell, wizard);
 
         if (dialog.open() == Window.OK) {
             return Status.OK_STATUS;
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/SetSecReferenceForSubtreeHandlerE4.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/SetSecReferenceForSubtreeHandlerE4.java
index 9b03c8d84..11b3a1704 100755
--- a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/SetSecReferenceForSubtreeHandlerE4.java
+++ b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/SetSecReferenceForSubtreeHandlerE4.java
@@ -26,7 +26,6 @@ import org.eclipse.swt.widgets.Shell;
 import eu.etaxonomy.cdm.api.service.config.SecundumForSubtreeConfigurator;
 import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
-import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigatorLabels;
 import eu.etaxonomy.taxeditor.navigation.navigator.operation.SetSecundumForSubtreeOperation;
 import eu.etaxonomy.taxeditor.operation.e4.RemotingCdmHandlerE4;
@@ -89,7 +88,7 @@ public class SetSecReferenceForSubtreeHandlerE4 extends RemotingCdmHandlerE4 {
         configurator = new SecundumForSubtreeConfigurator(taxonNode.getUuid());
         SetSecundumForSubtreeConfigurationWizard wizard = new SetSecundumForSubtreeConfigurationWizard(configurator);
 
-        WizardDialog dialog = new WizardDialog(AbstractUtility.getShell(), wizard);
+        WizardDialog dialog = new WizardDialog(shell, wizard);
 
         if (dialog.open() == Window.OK) {
             return Status.OK_STATUS;
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
old mode 100755
new mode 100644
index b1f5b38c5..480dcd69f
--- 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
@@ -14,7 +14,6 @@ import java.io.File;
 import java.io.FileOutputStream;
 import java.io.OutputStreamWriter;
 import java.io.Writer;
-import java.lang.reflect.InvocationTargetException;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Calendar;
@@ -44,13 +43,11 @@ import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.OperationCanceledException;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.e4.ui.di.UISynchronize;
 import org.eclipse.e4.ui.model.application.ui.basic.MPart;
 import org.eclipse.e4.ui.workbench.modeling.EPartService;
 import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.resource.ColorRegistry;
 import org.eclipse.jface.resource.FontRegistry;
 import org.eclipse.jface.viewers.IStructuredSelection;
@@ -60,7 +57,6 @@ import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.handlers.IHandlerService;
 import org.eclipse.ui.ide.undo.WorkspaceUndoUtil;
@@ -125,14 +121,6 @@ public abstract class AbstractUtility {
         return TaxeditorStorePlugin.getDefault().getWorkbench();
     }
 
-    public static IWorkbenchWindow getWorkbenchWindow() {
-        if (getWorkbench().getWorkbenchWindowCount() > 1) {
-            throw new IllegalStateException("More than one workbench window");
-        }
-        return getWorkbench().getWorkbenchWindows()[0];
-    }
-
-
     public static Object getService(Class api) {
         return TaxeditorStorePlugin.getDefault().getWorkbench().getService(api);
     }
@@ -524,12 +512,6 @@ public abstract class AbstractUtility {
         newMonitor.worked(steps);
     }
 
-    public static void runInUI(IRunnableWithProgress runnable,
-            ISchedulingRule rule) throws InvocationTargetException,
-            InterruptedException {
-        getProgressService().runInUI(getWorkbenchWindow(), runnable, rule);
-    }
-
     public static IProgressService getProgressService() {
         IWorkbench workbench = PlatformUI.getWorkbench();
         return workbench.getProgressService();
