Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2017-02-03 08:50:36 +0000
committerAndrey Loskutov2017-02-03 14:24:16 +0000
commit8983dd0246331a919318a4232ac8e6a81bc0923c (patch)
treefbe21eb16e201a954e650b23e964f5017ea31e46
parentb4fe50ff6a1cba5e29d33a1baaca4d884f6a19e6 (diff)
downloadeclipse.platform.ui-8983dd0246331a919318a4232ac8e6a81bc0923c.tar.gz
eclipse.platform.ui-8983dd0246331a919318a4232ac8e6a81bc0923c.tar.xz
eclipse.platform.ui-8983dd0246331a919318a4232ac8e6a81bc0923c.zip
Bug 408922 - Allow to disable themes via plugin_customization.ini
Added default scope to allow themes disabling via plugin_customization.ini. Change-Id: I0964e33e93830555ead5a80b566d404ff34a181c Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r--bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java8
1 files changed, 6 insertions, 2 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 92063b1da83..fb256677b4f 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
@@ -32,8 +32,11 @@ import javax.inject.Named;
import org.eclipse.core.databinding.observable.Realm;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.ISafeRunnable;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.core.runtime.preferences.DefaultScope;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.IScopeContext;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.e4.core.contexts.ContextInjectionFactory;
import org.eclipse.e4.core.contexts.EclipseContextFactory;
@@ -488,8 +491,9 @@ public class PartRenderingEngine implements IPresentationEngine {
curFactory = factory;
context.set(IRendererFactory.class, curFactory);
- IEclipsePreferences node = InstanceScope.INSTANCE.getNode("org.eclipse.e4.ui.workbench.renderers.swt");
- enableThemePreference = node.getBoolean(ENABLED_THEME_KEY, true);
+ IScopeContext[] contexts = new IScopeContext[] { DefaultScope.INSTANCE, InstanceScope.INSTANCE};
+ enableThemePreference = Platform.getPreferencesService().getBoolean("org.eclipse.e4.ui.workbench.renderers.swt",
+ ENABLED_THEME_KEY, true, contexts);
cssThemeChangedHandler = new StylingPreferencesHandler(context.get(Display.class));
}

Back to the top