Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Besedin2009-02-12 21:32:50 +0000
committerOleg Besedin2009-02-12 21:32:50 +0000
commit6237162448eef3ac7519d9a54040f5cb32e22b1f (patch)
tree75384fc4bc3a15f98ed34e85a89891b355c212bc
parent5b3d68d2015eeee85afdae97633c1030ff6c89a3 (diff)
downloadeclipse.platform.ui-6237162448eef3ac7519d9a54040f5cb32e22b1f.tar.gz
eclipse.platform.ui-6237162448eef3ac7519d9a54040f5cb32e22b1f.tar.xz
eclipse.platform.ui-6237162448eef3ac7519d9a54040f5cb32e22b1f.zip
Bug 264777 [context] Improve memory consumption for the context injection
-rw-r--r--bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/UIContextScheduler.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/UIContextScheduler.java b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/UIContextScheduler.java
index 37829c0d0f1..e9e33e56aa9 100644
--- a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/UIContextScheduler.java
+++ b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/UIContextScheduler.java
@@ -11,14 +11,25 @@
package org.eclipse.e4.workbench.ui.internal;
+import org.eclipse.e4.core.services.context.IEclipseContext;
import org.eclipse.e4.core.services.context.spi.IEclipseContextScheduler;
+import org.eclipse.e4.core.services.context.spi.IRunAndTrack;
import org.eclipse.swt.widgets.Display;
public class UIContextScheduler implements IEclipseContextScheduler {
static final public IEclipseContextScheduler instance = new UIContextScheduler();
-
+
public void schedule(Runnable runnable) {
Display.getDefault().asyncExec(runnable);
}
+
+ public boolean schedule(final IEclipseContext context, final IRunAndTrack runnable, final String name, final int eventType, final Object[] args) {
+ final boolean[] result = new boolean[1];
+ Display.getDefault().asyncExec(new Runnable () {
+ public void run() {
+ result[0] = runnable.notify(context, name, eventType, args);
+ }});
+ return result[0];
+ }
}

Back to the top