diff options
author | Leo Ufimtsev | 2017-05-10 18:36:19 +0000 |
---|---|---|
committer | Leo Ufimtsev | 2017-05-11 13:54:55 +0000 |
commit | 9f24457091da000f694220f098c177d686ab0952 (patch) | |
tree | 69f2ba081eb4613a169750f91014f67f3ace2eff | |
parent | 37dd64af3ce572c7755b1bb2f8887ff6ebcc87c0 (diff) | |
download | eclipse.jdt.ui-9f24457091da000f694220f098c177d686ab0952.tar.gz eclipse.jdt.ui-9f24457091da000f694220f098c177d686ab0952.tar.xz eclipse.jdt.ui-9f24457091da000f694220f098c177d686ab0952.zip |
Bug 516420: Problem hover status color should be the same as for normalS4_7_0_RC4aS4_7_0_RC4S4_7_0_RC3S4_7_0_RC2S4_7_0_RC1S4_7_0_M7R4_7I20170620-2000I20170619-2000I20170618-2355I20170618-2000I20170617-2000I20170616-2000I20170616-0530I20170615-2000I20170614-2000I20170613-2000I20170612-0950I20170610-0940I20170608-0530I20170607-2000I20170607-1100I20170607-0800I20170607-0215I20170606-2000I20170606-0800I20170605-2000I20170605-0800I20170604-2000I20170604-0800I20170603-1500I20170603-0800I20170603-0100I20170602-2000I20170531-2000I20170531-0800I20170530-2000I20170530-0800I20170529-2000I20170529-0800I20170528-2000I20170528-0800I20170527-1500I20170527-0800I20170526-2000I20170524-2000I20170524-0800I20170523-2000I20170523-0800I20170522-2000I20170522-0800I20170521-2000I20170521-0800I20170520-1500I20170518-1030I20170518-0830I20170518-0500I20170517-2000I20170517-0800I20170516-2000I20170516-0800I20170515-2000I20170515-0910I20170515-0800I20170514-2000I20170514-1120I20170512-0500I20170511-1200
content
Adding missing set*Color() calls to fix reported bug.
Cause:
AbstractAnnotationHover extends AbstractInformationControl and does
some setColoring for it's private child composite without updating the
color of the parent structure.
Test:
- Change information hover colors in preference
- Hover over snippet described in bug description
Before: Strip at the bottom was of different color.
After: Strip at the bottom is the same color as inner content.
(see attached screenshot in bug).
Reviewer note:
- I investigated private setColorAndFont(..). It is only used
for coloring of child elements, and only in deferredCreateContent().
As such, there is no situation where setColorAndFont(..) would be
called without set*Color() being called first.
This ensures consistent colors for this class.
Note, after doing a root-cause analysis, I found the same sort-of
issue in a few other classes that extend AbstractInformationControl,
namely:
- BrowserInformationControl
- ExpressionInformationControl
- LinkListInformationControl
I will address those in separate bug because they
1) need the new INFORMATION_ api (instead of further using HOVER_)
2) some are in separate repositories. (jdt/platform)
Change-Id: I837eceaf00b8ab8162f8490a1b48425bfc38210d
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=516420
Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
-rw-r--r-- | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/AbstractAnnotationHover.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/AbstractAnnotationHover.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/AbstractAnnotationHover.java index b86a83ab50..6c4f3d2af0 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/AbstractAnnotationHover.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/AbstractAnnotationHover.java @@ -293,7 +293,10 @@ public abstract class AbstractAnnotationHover extends AbstractJavaEditorTextHove if (background == null) { background= fParent.getBackground(); } - setColorAndFont(fParent, foreground, background, JFaceResources.getDialogFont()); + + setForegroundColor(foreground); // For main composite. + setBackgroundColor(background); + setColorAndFont(fParent, foreground, background, JFaceResources.getDialogFont()); // For child elements. ICompletionProposal[] proposals= getAnnotationInfo().getCompletionProposals(); if (proposals.length > 0) |