Bug 507062: Fix black strip of color in JavaDocHover
Use INFO color as defined in:
Bug 505738 – Define a information hover color which JDT, CDT or others
can use
Change-Id: I9bea571f48cd8ac64224062a2fbdbd5ec5fb0905
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=507062
Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControl.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControl.java
index 5a94a0b..af42edc 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControl.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControl.java
@@ -45,6 +45,7 @@
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.internal.text.revisions.Colors;
+import org.eclipse.jface.resource.ColorRegistry;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.util.Geometry;
@@ -181,8 +182,16 @@
fResizable= (shellStyle & SWT.RESIZE) != 0;
fShell= new Shell(parentShell, shellStyle);
Display display= fShell.getDisplay();
- Color foreground= display.getSystemColor(SWT.COLOR_INFO_FOREGROUND);
- Color background= display.getSystemColor(SWT.COLOR_INFO_BACKGROUND);
+
+ ColorRegistry colorRegistry = JFaceResources.getColorRegistry();
+ Color foreground= colorRegistry.get("org.eclipse.ui.workbench.HOVER_FOREGROUND"); //$NON-NLS-1$
+ if (foreground == null) {
+ foreground = display.getSystemColor(SWT.COLOR_INFO_FOREGROUND);
+ }
+ Color background= colorRegistry.get("org.eclipse.ui.workbench.HOVER_BACKGROUND"); //$NON-NLS-1$
+ if (background == null) {
+ background = display.getSystemColor(SWT.COLOR_INFO_BACKGROUND);
+ }
setColor(fShell, foreground, background);
GridLayout layout= new GridLayout(1, false);