I20171011-2000
tagged this
11 Oct 20:37
(platform.ui) I previously defined a "HOVER" color to allow information planes like javadoc, problem views etc.. to be styled and have proper colors on dark theme. However, later non-hover controls started using the color (e.g javadoc part), and "HOVER" turned out to be a bad name for the color. In this patch I'm deprecating the HOVER_ color without breaking backwards support, and instead I'm introducing "INFORMATION_*" color. Test: - Apply patch, launch child Eclipse. - Try dark theme. - Inspect Color preference Results: - Colors of Javadoc Hover on Dark theme work as before. - Information Colors in preference page look ok. Description is set. Javadoc background/foreground have correct colors. DefaultsTo buttons and "editDefault" are grayed out, so old deprecated color cannot be edited by javadoc colors (this was fixed in 516533). This means that there are no "dead" colors that are uneditable. - Javadoc colors do not mention "deprecated' anywhere, so deprecation is transparent to users. Notes: - hovering over "Javadoc" does not leak any notices of deprecation to user. Only developers will see the 'deprecation' note, users will be unaware. - Once this patch is merged, I will update JDT not to reference HOVER_ anymore. I can't think of a better solution to deprecating a color and haven't found other examples to copy from. If someone has alternative suggestions, please let me know. I tested that JDT does not break with this change. Javadoc hovers are present as before. Patch notes: Patch Set 1,2: - Implementing INFORMATION_ color ID instead of "HOVER_", because the colors are used in non-hover context. Patch Set 3: - Implemented solution with backwards compatibility. - Introduced INFORMATION_* colors. - Made old HOVER_* colors not-visible to the user (isEditable=false) Patch Set 4: - Moved deprecated note from label into description, and set labels to: "Hover * color". This way the javadoc colors don't mention deprecation in user interface, but a developer who looks at the color in the code will notice the description that links to the proper color. (See attached screenshot 'javadoc default label'). AFIK the user now never sees anything 'deprecated' related. Patch Set 7: - Rebased/updated. Change-Id: I76670ce5b1ec896d8f153ae0d9d161ae38c51ad2 Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>