From: Patrick Plitzner Date: Mon, 3 Apr 2017 10:24:08 +0000 (+0200) Subject: fix #6549 Fix ClassCastException X-Git-Tag: 4.7.0^2~102 X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/commitdiff_plain/98b22c11b756de3b32e723e1d888d2f2dbe5df5e fix #6549 Fix ClassCastException --- 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 a490390a6..f1ffe8abe 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 @@ -38,7 +38,6 @@ 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.window.ApplicationWindow; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.widgets.Display; @@ -167,11 +166,11 @@ public abstract class AbstractUtility { * * @return a {@link org.eclipse.jface.window.ApplicationWindow} object. */ - public static ApplicationWindow getWorkbenchWindow() { + public static IWorkbenchWindow getWorkbenchWindow() { if (getWorkbench().getWorkbenchWindowCount() > 1) { throw new IllegalStateException("More than one workbench window"); } - return (ApplicationWindow) getWorkbench().getWorkbenchWindows()[0]; + return getWorkbench().getWorkbenchWindows()[0]; } /**