Bug 103907 - [Themes] Colors and fonts settings not remembered with non default theme
Summary: [Themes] Colors and fonts settings not remembered with non default theme
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 major with 2 votes (vote)
Target Milestone: 3.4   Edit
Assignee: Kim Horne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-14 16:39 EDT by Andrey Loskutov CLA
Modified: 2015-02-18 14:03 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Loskutov CLA 2005-07-14 16:39:15 EDT
I can reproduce it with 3.1 final - on 3.0, I use very small courier font for 
the debug console, and this setting was remembered. After clean install of 
Eclipse 3.1 and setting the smaler font size (and/or another font), this setting 
will be accepted only for the current session. Next time I start Eclipse, the 
console font is reset to the default size/font.

Moreover, the setting of the color for the console seems to be completely broken 
in 3.1 - I could not change the font color in the debug console.

With 3.1, this is a regression comparing to 3.0.
Comment 1 Kevin Barnes CLA 2005-07-18 17:21:37 EDT
All the settings can be changed and changes are saved for me. Any more
information that might be helpful? What font size are you changing it to?
Comment 2 Andrey Loskutov CLA 2005-07-18 17:33:01 EDT
Color and Fonts -> Debug -> Console Font ->
Courier New -> Standard -> 8 (from 10 as default).
Then restart Eclipse, and see 10 font size again. This can be reproduced always, 
on both my home PC and in my office. 

The same is for console font color, but I don't need to restart Eclipse - the 
setting is simply ignored.

My collegue has also the same problem since migrating to 3.1.

I use Win XP, german edition.
Comment 3 Andrey Loskutov CLA 2005-07-18 17:36:36 EDT
Forgot to say that I run Eclipse on JDK 1.5_03 at home and 1.4.2_06 at work, so 
this couldn't be a problem with JDK.
Comment 4 Kevin Barnes CLA 2005-07-18 17:41:41 EDT
Could be a problem with the german edition of XP??? I've tested on mac 1.4 and
on XP (english) with 1.4. Unable to reproduce described behavior.

Does changing other fonts/colors work? 
Comment 5 Andrey Loskutov CLA 2005-07-19 18:14:01 EDT
I've got it. I don't know if this good or bad...

The first thing - I use my own presentation + theme, (http://andrei.gmxhome.de/
skins/index.html) (because I hate the bug 68684).

Second thing - this theme does *not* change *anything* in "debug console" 
settings or any one other common plugin settings.

The reason for all evil with preferences - in Eclipse, there is lot of code 
which deals *only* with "default theme" (defined in IThemeManager.DEFAULT_THEME
), like in Workbench.initializeFonts() and ThemeElementHelper.
populateRegistry(...) methods.

Somewhere (I can't find the right place), the custom font changes, initiated 
during running Eclipse with non-default theme, will be either not properly 
stored or not properly read or overriden with default fonts on the next start 
(and I think this is the case in ThemeElementHelper).

I can properly "persist" my changes in font definitions dialog *only* if I run 
Eclipse with "default theme", change then the debug console font to smaller one, 
change then the "default theme" to my own (Extended VS Theme) and restart 
Eclipse. Then (and only then), I will have the smaller font in the debug console 
view in my custom theme too... Any changes for *common* font preferences I have 
made running Eclipse with "Extended VS Theme" are lost after Eclipse restart. 
After restart of Eclipse I can see only changes in font definitions, which was 
defined in the "Extended VS Theme" plugin.xml, all others are disappear.

But this was clearly not intended that users need switch to "default theme" to 
change some settings in the current non-default theme???

If I look in the code in org.eclipse.ui.internal.themes.ThemeElementHelper 
class, then I would think, that as workaround I need *all* existing font 
definitions from *all* plugins to be in my own theme, because only then they 
will be not overriden in populateRegistry() methods... But was it intended 
behavoir, or I miss something???
Comment 6 Kevin Barnes CLA 2005-07-26 10:19:54 EDT
moving to Platform-UI for comment
Comment 7 Andrey Loskutov CLA 2007-06-13 17:43:36 EDT
Still exist in 3.3 RC4.
The problem remains the same: if a non-default theme is set, user changes in font and color settings not overriden by the current theme would be ignored by Eclipse. 

To test it, contribute a new theme in a sample plugin and *do not* override the basic text font setting by <fontOverride id="org.eclipse.jface.textfont" />. 
Try any perspective factory with this new theme - change "Colors and fonts" ->"Basic"->"Text font" to "Arial 12" - this change would be lost after Eclipse restart. Then, add <fontOverride id="org.eclipse.jface.textfont" /> to the theme definition and try to change the same setting again: now it works.

But it is impossible to third-party theme creators to override ALL other possible fonts/colors settings contributed to the "org.eclipse.ui.themes" extension point. 

As is: 
user changes on not overriden fonts/colors settings contributed to the "org.eclipse.ui.themes" extension point are ignored by Eclipse.

Should be: 
if theme does not override a special color or font definition, user changes on this values should be still accepted and persisted by Eclipse.
Comment 8 tolan blundell CLA 2008-02-12 03:55:17 EST
This bug is quite annoying and pretty much makes alternate themes useless for me and I have to re-enter my font settings every time I start Eclipse. Is there any chance of this being picked up soon?
Comment 9 Kim Horne CLA 2008-05-02 15:40:09 EDT
There have been numerous changes to themes that have fixed this bug (and parts of this bug) over the 3.4 release.  I suggest all interested parties download the latest 3.4 build and verify your conditions are met.
Comment 10 Kim Horne CLA 2008-05-20 09:38:36 EDT
Verified in I20080519-2000 that you can override a value in a non-default theme.
Comment 11 Mario Marinato CLA 2013-08-30 15:29:22 EDT
We're developing an RCP application based on Eclipse 3.8 and we're facing this exact same problem here.

We have various colors configurations for our views and I'm creating a new theme that overrides some of those settings.

When we run the application with that new theme set and change one of the settings not overriden via plugin.xml, it works only during current session.  Once our RCP is restarted the setting is lost.

On the "Colors and Fonts" preference page, the given preference shows its original color, but if you select it, the "revert" button is enabled.

I checked the .prefs file and the setting with the color we choose is always there.
Comment 12 Seamus O\'Keefe CLA 2014-09-06 13:42:17 EDT
This issue seems to be occurring again.  I had a custom default font set and Eclipse will not honor the preference after restarting.

Version: Luna Release (4.4.0)
Build id: 20140612-0600

Using "Eclipse for JavaEE Developers"

Steps to reproduce:

1. Deleted .settings folder under workspace\.metadata\.plugins\org.eclipse.core.runtime

2. Opened Eclipse, set new default font (Inconsolata 12)

3. Changed theme from Windows 7 default to Windows 7 classic reduced pallette

4. closed Eclipse

When I reopened the default font was still Inconsolata, but all language specific settings were set to override to the original default of Consolas.

I went through the steps again without changing the theme and the font settings were preserved and honored.