Bug 516515 - Ensure that classes that extend AbstractAnnotationHover are consistent with their use of set*Color()
Summary: Ensure that classes that extend AbstractAnnotationHover are consistent with t...
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on: ColorInfoApi
Blocks: LinuxIDEColorTracker
  Show dependency tree
 
Reported: 2017-05-11 10:50 EDT by Leo Ufimtsev CLA
Modified: 2020-08-11 14:06 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leo Ufimtsev CLA 2017-05-11 10:50:10 EDT
While fixing:
Bug 516420 – Problem hover status color should be the same as for normal content 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=516420

I found that some child classes of AbstractAnnotationHover set colors for their children, but don't update the parent structure. Leading to potentially inconsistent colors in hoverboxes.

Conspicuous classes that I need to investigate are:
- BrowserInformationControl hard-codes colors 1*. 
- ExpressionInformationControl & LinkListInformationControl color their children without styling parent structure.

Implementation dependant on API update/implementation:
Bug 508819 – Define proper API for hover/info color constants 

Thought to self:
- Maybe incorporate INFORMATION_* into JFaceColors:getInformationViewer*(). 
  That way it would return INFORMATION_ *user* color instead of hard-coded constants.
  But that would have the problem that some controls might not get updated till they are re-created.

[1] Calls COLOR_INFO*. Should use new INFORMATION_ api + property change listener. I.e, do like in: https://git.eclipse.org/r/#/c/96066/4/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavadocHover.java
Comment 1 Leo Ufimtsev CLA 2017-10-12 11:50:37 EDT
Dependent merged. I'll need to look into this. Currently pending till I finish webkit2 port.
Comment 2 Leo Ufimtsev CLA 2018-02-06 15:43:59 EST
@Roland, I think you already fixed a bunch of these.
But the classes mentioned in comment #1 may be of interest.
Comment 3 Alexander Kurtakov CLA 2018-03-20 15:23:52 EDT
What is the status of this one guys ?
Comment 4 Leo Ufimtsev CLA 2018-03-23 12:13:11 EDT
(In reply to Leo Ufimtsev from comment #0)

> Conspicuous classes that I need to investigate are:
> - BrowserInformationControl hard-codes colors 1*. 
> - ExpressionInformationControl & LinkListInformationControl color their
> children without styling parent structure.

I haven't been on top of the color stuff lateley, but if these two work well, then we can probably close the bug.

@Roland, wdyt?
Comment 5 Roland Grunberg CLA 2018-03-23 14:19:37 EDT
There would be a few classes that seem to use SWT.COLOR_INFO* but are we able to reproduce improper colour in the UI ? I've tried with BrowserInformationControl during a javadoc hover but although the background/foreground use the wrong constants, it comes out looking fine.
Comment 6 Leo Ufimtsev CLA 2018-03-23 14:31:29 EDT
(In reply to Roland Grunberg from comment #5)
> There would be a few classes that seem to use SWT.COLOR_INFO* but are we
> able to reproduce improper colour in the UI ? I've tried with
> BrowserInformationControl during a javadoc hover but although the
> background/foreground use the wrong constants, it comes out looking fine.

They're overriden by setBackground/foreground higher up.

Should we just set them to LIST foreground/background? Since this doesn't seem to affect anything, the worst case is they appear white on windows platform instead of yellow.
I'd like to not see INFO* be used at all unless it's explicitly for a tooltip.
Comment 7 Eclipse Genie CLA 2020-08-11 14:06:20 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. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. 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.