Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 516533 - Bug: isEditable="false" colors/fonts can still be edited if referenced by other colors
Summary: Bug: isEditable="false" colors/fonts can still be edited if referenced by oth...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.8   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.8 M1   Edit
Assignee: Leo Ufimtsev CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: ColorInfoApi
  Show dependency tree
 
Reported: 2017-05-11 15:57 EDT by Leo Ufimtsev CLA
Modified: 2017-07-13 16:21 EDT (History)
3 users (show)

See Also:


Attachments
Screenshot of issue (116.45 KB, image/png)
2017-05-11 16:31 EDT, Leo Ufimtsev CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leo Ufimtsev CLA 2017-05-11 15:57:22 EDT
While working on the color api fix patch (Bug 508819) I found two issues with Color/Font preference if defaultsTo is used.

1) Definitions can still be edited by others:
If you set a color (or font) to be not editable (isEditable=false), then Colors (or fonts) that reference it  via defaultsTo=... can still edit such colors (or fonts).

2) User preferred color is loaded instead of default if isEditable=false is set:
If a user sets a color (e.g HOVER_/Information), and if that color is subsequently made 'isEditable=false', then when eclipse loads, the prefered user color is loaded instead of the default one.
So if colors that reference it use "reset to default", they get the old prefered color instead of the default one. This has the issue that the old color is left no-mans-land and cannot be changed and isn't set to it's default.

I wrote a fix to address these problems. Patch to be submitted shortly.
Comment 1 Eclipse Genie CLA 2017-05-11 16:00:25 EDT
New Gerrit change created: https://git.eclipse.org/r/96889
Comment 2 Eclipse Genie CLA 2017-05-11 16:29:02 EDT
New Gerrit change created: https://git.eclipse.org/r/96895
Comment 3 Leo Ufimtsev CLA 2017-05-11 16:31:26 EDT
Created attachment 268295 [details]
Screenshot of issue
Comment 4 Leo Ufimtsev CLA 2017-05-11 16:35:23 EDT
~Awaiting patch review when time is right...
Comment 5 Leo Ufimtsev CLA 2017-05-25 11:50:50 EDT
~Awaiting Oxygen release / code unfreeze at end of June.
Comment 6 Leo Ufimtsev CLA 2017-07-04 10:47:42 EDT
~Awaiting patch review/merge.
Comment 7 Leo Ufimtsev CLA 2017-07-10 16:15:53 EDT
@ Platform.ui committers, can someone review please?
Comment 9 Lars Vogel CLA 2017-07-11 13:32:59 EDT
Tested with the properties from org.eclipse.e4.demo.cssbridge.ui.views.Theme and the new behavior looks correct to me. Thanks, Leo.
Comment 10 Leo Ufimtsev CLA 2017-07-13 16:20:45 EDT
(In reply to Lars Vogel from comment #9)
> Tested with the properties from org.eclipse.e4.demo.cssbridge.ui.views.Theme
> and the new behavior looks correct to me. Thanks, Leo.

Thank you for review