Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2005-03-14 14:21:22 +0000
committerDani Megert2005-03-14 14:21:22 +0000
commit302e999bdd58cbcd7a279283204cd3078bc3fd82 (patch)
treeb874a9abbf960e293e58b2cdd211434d24749838
parentf2c29a10195b724511b3cb8f41a00ae4f6c0141e (diff)
downloadeclipse.jdt.ui-302e999bdd58cbcd7a279283204cd3078bc3fd82.tar.gz
eclipse.jdt.ui-302e999bdd58cbcd7a279283204cd3078bc3fd82.tar.xz
eclipse.jdt.ui-302e999bdd58cbcd7a279283204cd3078bc3fd82.zip
Adapted to fixed Platform UI bug
-rw-r--r--org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ASTProvider.java15
1 files changed, 3 insertions, 12 deletions
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ASTProvider.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ASTProvider.java
index dfc2d1ddae..d8b9dcc755 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ASTProvider.java
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ASTProvider.java
@@ -20,7 +20,6 @@ import org.eclipse.jface.text.Assert;
import org.eclipse.ui.IPartListener2;
import org.eclipse.ui.IWindowListener;
-import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartReference;
import org.eclipse.ui.IWorkbenchWindow;
@@ -249,7 +248,6 @@ public final class ASTProvider {
private Object fReconcileLock= new Object();
private Object fWaitLock= new Object();
private boolean fIsReconciling;
- private IWorkbench fWorkbench;
private IWorkbenchPart fActiveEditor;
/**
@@ -265,17 +263,10 @@ public final class ASTProvider {
void install() {
// Create and register activation listener
fActivationListener= new ActivationListener();
-
- /*
- * XXX: Don't in-line this field unless the following bug has been fixed:
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=55246
- */
- fWorkbench= PlatformUI.getWorkbench();
-
- fWorkbench.addWindowListener(fActivationListener);
+ PlatformUI.getWorkbench().addWindowListener(fActivationListener);
// Ensure existing windows get connected
- IWorkbenchWindow[] windows= fWorkbench.getWorkbenchWindows();
+ IWorkbenchWindow[] windows= PlatformUI.getWorkbench().getWorkbenchWindows();
for (int i= 0, length= windows.length; i < length; i++)
windows[i].getPartService().addPartListener(fActivationListener);
}
@@ -578,7 +569,7 @@ public final class ASTProvider {
public void dispose() {
// Dispose activation listener
- fWorkbench.removeWindowListener(fActivationListener);
+ PlatformUI.getWorkbench().removeWindowListener(fActivationListener);
fActivationListener= null;
disposeAST();

Back to the top