Bug 478835 - "Restore Defaults" for Syntax Coloring pref page doesn't work under Dark theme.
Summary: "Restore Defaults" for Syntax Coloring pref page doesn't work under Dark theme.
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5   Edit
Hardware: PC Windows 7
: P3 normal with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2015-10-01 13:03 EDT by Bruno Medeiros CLA
Modified: 2022-04-22 00:54 EDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bruno Medeiros CLA 2015-10-01 13:03:49 EDT
If the Dark theme is enabled, pressing "Restore Defaults" on the Syntax Coloring pref page doesn't work properly: it will restore to the non-dark theme defaults.
Comment 1 Albert Tregnaghi CLA 2019-02-09 11:54:05 EST
This is still an issue and very annoing "user experience".

In some of my editors I define a special "Restore dark theme defaults" button, but this a very dirty workaround.

Another workaround is that users do switch back to light theme and then to dark theme again. Then defaults are there...

As it works at "theme switching time" it should be possible at "restore defaults" as well.
Comment 2 Eclipse Genie CLA 2021-09-07 17:55:46 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.

If you have further information on the current state of the bug, please add it. 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.
Comment 3 Vikas Chandra CLA 2022-02-18 06:41:25 EST
I hit this issue with latest I build
Comment 4 Kalyan Prasad Tatavarthi CLA 2022-02-22 06:27:40 EST
The method JavaUIPreferenceInitializer.setThemeBasedPreferences  tries to get the current theme of the workbench from org.eclipse.ui.internal.themes.WorkbenchThemeManager , but this returns the current theme as default theme even if the theme being used is Dark theme. 

The currentTheme of org.eclipse.ui.internal.themes.WorkbenchThemeManager is used to get the org.eclipse.jface.resource.ColorRegistry, which is then used by JavaUIPreferenceInitializer.setThemeBasedPreferences method to set the default values. As the currentTheme of org.eclipse.ui.internal.themes.WorkbenchThemeManager is not updated when the theme is updated in the ThemeEngine, this issue is happening.

The same issue occurs for other preferences in : General > Appearance > Colors and Fonts, Select any option such as Basic , Target File Editor etc , expand and press 
"Restore Defaults" in Dark theme, and all the colors are reset to Light theme defaults.

So, moving the bug to Platform UI.