Bug 516364: Replace use of HOVER_ color with INFORMATION_
Currently javadoc uses org.eclipse.ui.workbench.HOVER_* as defaults.
HOVER_* is deprecated. Use INFORMATION instead.
Tests:
1)
- Open child eclipse with light theme
- Change to dark theme
- Inspect javadoc popup, javadoc should look dark as before.
2)
- Open child eclipse with light theme.
- Set a custom javadoc color (e.g blue background)
- Activate dark theme.
- Inspect javadoc popup, javadoc's backdroung should be dark as before
(I.e, darktheme should override with dark javadoc colors).
Change-Id: Ie8583c5757a9dd2692f5cbaf3a0899e7dedebc14
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=516364
Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
diff --git a/org.eclipse.jdt.ui/css/e4-dark_jdt_syntaxhighlighting.css b/org.eclipse.jdt.ui/css/e4-dark_jdt_syntaxhighlighting.css
index 994bcf1..2169c5c 100644
--- a/org.eclipse.jdt.ui/css/e4-dark_jdt_syntaxhighlighting.css
+++ b/org.eclipse.jdt.ui/css/e4-dark_jdt_syntaxhighlighting.css
@@ -99,6 +99,8 @@
IEclipsePreferences#org-eclipse-ui-workbench:org-eclipse-jdt-ui { /* pseudo attribute added to allow contributions without replacing this node, see Bug 466075 */
preferences:
'org.eclipse.jdt.ui.ColoredLabels.inherited=143,143,191'
+ 'org.eclipse.jdt.ui.Javadoc.backgroundColor=52,57,61'
+ 'org.eclipse.jdt.ui.Javadoc.foregroundColor=238,238,238'
}
BulletListBlock > StyledText {
diff --git a/org.eclipse.jdt.ui/plugin.xml b/org.eclipse.jdt.ui/plugin.xml
index 131e99b..4b323a4 100644
--- a/org.eclipse.jdt.ui/plugin.xml
+++ b/org.eclipse.jdt.ui/plugin.xml
@@ -1120,7 +1120,7 @@
<colorDefinition
label="%JavadocBackgroundColor.label"
categoryId="org.eclipse.jdt.ui.presentation"
- defaultsTo="org.eclipse.ui.workbench.HOVER_BACKGROUND"
+ defaultsTo="org.eclipse.ui.workbench.INFORMATION_BACKGROUND"
id="org.eclipse.jdt.ui.Javadoc.backgroundColor">
<description>
%JavadocBackgroundColor.description
@@ -1129,7 +1129,7 @@
<colorDefinition
label="%JavadocForegroundColor.label"
categoryId="org.eclipse.jdt.ui.presentation"
- defaultsTo="org.eclipse.ui.workbench.HOVER_FOREGROUND"
+ defaultsTo="org.eclipse.ui.workbench.INFORMATION_FOREGROUND"
id="org.eclipse.jdt.ui.Javadoc.foregroundColor">
<description>
%JavadocForegroundColor.description
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 3f40531..c0683c9 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
@@ -53,6 +53,7 @@
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.JFacePreferences;
import org.eclipse.jface.resource.ColorRegistry;
import org.eclipse.jface.resource.JFaceResources;
@@ -285,11 +286,11 @@
createAnnotationInformation(fParent, getAnnotationInfo().annotation);
ColorRegistry colorRegistry= JFaceResources.getColorRegistry();
- Color foreground= colorRegistry.get("org.eclipse.ui.workbench.HOVER_FOREGROUND"); //$NON-NLS-1$
+ Color foreground= colorRegistry.get(JFacePreferences.INFORMATION_FOREGROUND_COLOR);
if (foreground == null) {
foreground= fParent.getForeground();
}
- Color background= colorRegistry.get("org.eclipse.ui.workbench.HOVER_BACKGROUND"); //$NON-NLS-1$
+ Color background= colorRegistry.get(JFacePreferences.INFORMATION_BACKGROUND_COLOR);
if (background == null) {
background= fParent.getBackground();
}