Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBogdan Gheorghe2010-06-30 17:05:46 +0000
committerBogdan Gheorghe2010-06-30 17:05:46 +0000
commitf2d7083f4c6ac8c985d69a6aa11213cd14f25270 (patch)
treecce93379e23d5193b9d936039408e8475948441b /bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java
parent9c705df4488f862ecfa113a80f510601967414ee (diff)
downloadeclipse.platform.ui-f2d7083f4c6ac8c985d69a6aa11213cd14f25270.tar.gz
eclipse.platform.ui-f2d7083f4c6ac8c985d69a6aa11213cd14f25270.tar.xz
eclipse.platform.ui-f2d7083f4c6ac8c985d69a6aa11213cd14f25270.zip
313950 - CSS Engine creates unnecessary contexts and injections
Diffstat (limited to 'bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java')
-rw-r--r--bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java b/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java
index 6babd49fa7c..17e7e48e743 100644
--- a/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java
+++ b/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java
@@ -23,6 +23,7 @@ import javax.inject.Named;
import org.eclipse.core.databinding.observable.Realm;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+import org.eclipse.e4.core.contexts.EclipseContextFactory;
import org.eclipse.e4.core.contexts.IContextConstants;
import org.eclipse.e4.core.contexts.IEclipseContext;
import org.eclipse.e4.core.di.IDisposable;
@@ -763,7 +764,11 @@ public class PartRenderingEngine implements IPresentationEngine {
final IThemeEngine engine = mgr.getEngineForDisplay(display);
// Store the app context
- display.setData("org.eclipse.e4.ui.css.context", appContext); //$NON-NLS-1$
+ IContributionFactory contribution = (IContributionFactory) appContext
+ .get(IContributionFactory.class.getName());
+ IEclipseContext cssContext = EclipseContextFactory.create();
+ cssContext.set(IContributionFactory.class.getName(), contribution);
+ display.setData("org.eclipse.e4.ui.css.context", cssContext); //$NON-NLS-1$
// Create the OSGi resource locator
if (cssResourcesURI != null) {

Back to the top