Author: dgolovin
Date: 2012-08-21 20:34:36 -0400 (Tue, 21 Aug 2012)
New Revision: 43141
Modified:
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaEditorTracker.java
Log:
suppress JavaEditorTraking in case of running tests in core mode
Modified:
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaEditorTracker.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaEditorTracker.java 2012-08-21
23:20:02 UTC (rev 43140)
+++
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaEditorTracker.java 2012-08-22
00:34:36 UTC (rev 43141)
@@ -26,6 +26,7 @@
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
import org.jboss.tools.common.validation.CommonValidationPlugin;
/**
@@ -52,13 +53,15 @@
}
private void init() {
- IWorkbench workbench = CommonValidationPlugin.getDefault().getWorkbench();
- if(workbench != null) {
- IWorkbenchWindow[] windows = workbench.getWorkbenchWindows();
- for (IWorkbenchWindow window: windows) {
- windowOpened(window);
+ if(PlatformUI.isWorkbenchRunning()) {
+ IWorkbench workbench = CommonValidationPlugin.getDefault().getWorkbench();
+ if(workbench != null) {
+ IWorkbenchWindow[] windows = workbench.getWorkbenchWindows();
+ for (IWorkbenchWindow window: windows) {
+ windowOpened(window);
+ }
+ CommonValidationPlugin.getDefault().getWorkbench().addWindowListener(this);
}
- CommonValidationPlugin.getDefault().getWorkbench().addWindowListener(this);
}
}
Show replies by date