Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.e4.tools.compat/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.e4.tools.compat/pom.xml2
-rw-r--r--bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ContextServiceFactory.java16
3 files changed, 12 insertions, 8 deletions
diff --git a/bundles/org.eclipse.e4.tools.compat/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.tools.compat/META-INF/MANIFEST.MF
index 5e969763..8d2ebf82 100644
--- a/bundles/org.eclipse.e4.tools.compat/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.e4.tools.compat/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.e4.tools.compat;singleton:=true
-Bundle-Version: 4.7.600.qualifier
+Bundle-Version: 4.7.700.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.ui;bundle-version="3.6.0",
org.eclipse.core.runtime;bundle-version="3.6.0",
diff --git a/bundles/org.eclipse.e4.tools.compat/pom.xml b/bundles/org.eclipse.e4.tools.compat/pom.xml
index 7a8649bb..9f463e23 100644
--- a/bundles/org.eclipse.e4.tools.compat/pom.xml
+++ b/bundles/org.eclipse.e4.tools.compat/pom.xml
@@ -10,7 +10,7 @@
<groupId>eclipse.platform.ui.tools</groupId>
<artifactId>org.eclipse.e4.tools.compat</artifactId>
- <version>4.7.600-SNAPSHOT</version>
+ <version>4.7.700-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ContextServiceFactory.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ContextServiceFactory.java
index 8594181e..525a7002 100644
--- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ContextServiceFactory.java
+++ b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ContextServiceFactory.java
@@ -45,7 +45,7 @@ public class ContextServiceFactory extends AbstractServiceFactory {
@Override
public Object create(Class serviceInterface, IServiceLocator parentLocator,
- IServiceLocator locator) {
+ IServiceLocator locator) {
if (!IEclipseContext.class.equals(serviceInterface)) {
return null;
}
@@ -70,17 +70,21 @@ public class ContextServiceFactory extends AbstractServiceFactory {
appContext.set(IClipboardService.class, new ClipboardServiceImpl());
appContext.set(Realm.class, Realm.getDefault());
- final Display d = Display.getCurrent();
+ final Display display = Display.getCurrent();
appContext.set(UISynchronize.class, new UISynchronize() {
@Override
public void syncExec(Runnable runnable) {
- d.syncExec(runnable);
+ if (display != null && !display.isDisposed()) {
+ display.syncExec(runnable);
+ }
}
@Override
public void asyncExec(Runnable runnable) {
- d.asyncExec(runnable);
+ if (display != null && !display.isDisposed()) {
+ display.asyncExec(runnable);
+ }
}
});
@@ -114,7 +118,7 @@ public class ContextServiceFactory extends AbstractServiceFactory {
@Override
public void setClassnameAndId(Object widget, String classname,
- String id) {
+ String id) {
((Widget) widget).setData("org.eclipse.e4.ui.css.CssClassName", classname); //$NON-NLS-1$
((Widget) widget).setData("org.eclipse.e4.ui.css.id", id); //$NON-NLS-1$
engine.applyStyles(widget, true);
@@ -123,7 +127,7 @@ public class ContextServiceFactory extends AbstractServiceFactory {
if (appContext.get(ILoggerProvider.class) == null) {
appContext.set(ILoggerProvider.class,
- ContextInjectionFactory.make(DefaultLoggerProvider.class, appContext));
+ ContextInjectionFactory.make(DefaultLoggerProvider.class, appContext));
}
return appContext;

Back to the top