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

Bug 338658

Summary: [Preferences] colorDefinition not stored when run from IDE
Product: [Eclipse Project] Platform Reporter: Christian Pontesegger <christian.pontesegger>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: RESOLVED WORKSFORME QA Contact: Oleg Besedin <ob1.eclipse>
Severity: minor    
Priority: P3 CC: daniel_megert, prakash
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Christian Pontesegger CLA 2011-03-02 07:37:32 EST
Build Identifier: M20100909-0800

I've got an RCP that extends org.eclipse.ui.themes to supply its own colorDefinition and fontDefinition items. When my RCP is started from within Eclipse I can modify these entries, but they are not stored permanently. 

This is not a problem, but I could not find any note on this in the documentation. Took some time to figure out that this works as expeceted as soon as you build a product.

Reproducible: Always
Comment 1 Prakash Rangaraj CLA 2011-03-03 03:52:10 EST
Christian,
    I'm sorry, I did not understand this clearly. So you had the Colors and Fonts Preference page in your RCP app and edited in when running the RCP from Eclipse and expected the values to restored when you launch the RCP with a fresh workspace?
Comment 2 Christian Pontesegger CLA 2011-03-03 12:07:29 EST
Almost :)

I did run my RCP from Eclipse. There I altered some settings for my custom defined colors and fonts. I did this by using Preferences -> General -> Appearance -> Colors & Fonts. The settings were applied correctly immediately as my view uses a listener for this.

When I restart my RCP (without clearing the workspace) those changes are gone and I am stuck with my default settings again.

As I use the same workspace again (without clearing it) I expected these settings to be stored too. At least other preferences are stored permanently as much as workbench layout is.
Comment 3 Christian Pontesegger CLA 2011-03-08 10:40:23 EST
Found the solution today.

I had another bug where an exception was raised during shutdown from UI thread because some widget was already disposed. 
By fixing this issue the behaviour mentioned above disappeared too. So it seems saving of my user settings was not done correctly because one of my components raised an exception before.

Sorry to have bothered the UI team on this
Comment 4 Oleg Besedin CLA 2011-04-12 16:09:43 EDT
(In reply to comment #3)
> Found the solution today.
> 
> I had another bug where an exception was raised during shutdown from UI thread
> because some widget was already disposed. 
> By fixing this issue the behaviour mentioned above disappeared too.

Glad you found the solution!