Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 408922

Summary: Unable to change org.eclipse.e4.ui.css.swt.theme/themeid via plugin_customization.ini
Product: [Eclipse Project] Platform Reporter: Ulrich Grave <ulrich.grave>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: eclipse.sprigogin, eclipse, gheorghe, Lars.Vogel, loskutov, peter, psuzzi
Version: 4.3   
Target Milestone: ---   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/90237
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=8983dd0246331a919318a4232ac8e6a81bc0923c
Whiteboard: stalebug

Description Ulrich Grave CLA 2013-05-24 02:28:37 EDT
Build: 4.3RC1 I20130516-2200

I try to set the default theme via -pluginCustomization but it take no effect if i start eclipse with a new workspace.

The file is located in the eclipse install folder and i start eclipse with eclipse.exe -pluginCustomization plugin_customization.ini

plugin_customization.ini:
org.eclipse.e4.ui.css.swt.theme/themeid=net.jeeeyul.eclipse.themes.chrome

I also test it with the "org.eclipse.ui/ENABLE_ANIMATIONS" preference this works.

The same problem exists in 4.2.2.
Comment 1 Paul Webster CLA 2013-07-30 13:58:42 EDT
*** Bug 413955 has been marked as a duplicate of this bug. ***
Comment 2 Peter Severin CLA 2014-09-30 12:49:52 EDT
I've also encountered this issue and unable to change the default them for my RCP application (WireframeSketcher). Is there a possible workaround that I can apply?
Comment 3 Daniel Rolka CLA 2014-10-02 03:37:50 EDT
(In reply to Peter Severin from comment #2)
> I've also encountered this issue and unable to change the default them for
> my RCP application (WireframeSketcher). Is there a possible workaround that
> I can apply?

Yes, you can set the theme via the 'cssTheme' command line option, like:

-cssTheme org.eclipse.e4.ui.css.theme.e4_classic

Daniel
Comment 4 Andrey Loskutov CLA 2017-02-03 03:48:30 EST
I see the same issue, and even Oomph is not able to fix this, because the preferences are set after workbench is started (with themes), and command line customization via Oomph makes the option *permanent*.

I have a fix.
Comment 5 Andrey Loskutov CLA 2017-02-03 04:10:25 EST
Arrgh, this is more then I've expected. Can't spend so much time on this, will just provide a way to disable themes via plugin_customization.

Pointers for later:
org.eclipse.e4.ui.internal.workbench.swt.E4Application.setCSSContextVariables(IApplicationContext, IEclipseContext)
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.initializeStyling(Display, IEclipseContext)
org.eclipse.ui.internal.dialogs.ViewsPreferencePage.init(IWorkbench)
Comment 6 Eclipse Genie CLA 2017-02-03 04:15:53 EST
New Gerrit change created: https://git.eclipse.org/r/90237
Comment 8 Lars Vogel CLA 2017-05-19 08:37:51 EDT
This breaks e4 styling and is a regression. We should set enableThemePreference to true to still support initial e4 styling.
Comment 9 Lars Vogel CLA 2017-05-19 08:38:15 EDT
.
Comment 10 Andrey Loskutov CLA 2017-05-19 08:43:39 EDT
(In reply to Lars Vogel from comment #8)
> This breaks e4 styling and is a regression. We should set
> enableThemePreference to true to still support initial e4 styling.

Sorry, what is "this" and how does "this" break e4 styling?
Comment 11 Lars Vogel CLA 2017-05-19 11:46:39 EDT
With the new preference the styling for a customer Eclipse 4 RCP lifecycle handler does not work anymore. As the fix on the client side is trivial (set the preference) and CSS is not API I move that bug to fixed.

Offending code snippet for later references

Class PartRenderingEngine

if ("none".equals(cssTheme) || (!enableThemePreference)) {
Comment 12 Andrey Loskutov CLA 2017-05-22 07:22:51 EDT
The bug was not fixed, not sure why it was closed as such.
Comment 13 Eclipse Genie CLA 2020-04-11 03:39:00 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.