Bug 477487 - Declaration view background color should use same default as Source hover
Summary: Declaration view background color should use same default as Source hover
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.6 M3   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-15 13:07 EDT by Markus Keller CLA
Modified: 2015-09-30 12:18 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2015-09-15 13:07:43 EDT
The Declaration view background color defaults to COLOR_INFO_BACKGROUND. On systems with bright-on-dark tooltips, this makes the Declaration view unreadable.

From /org.eclipse.jdt.ui/plugin.xml:

      <colorDefinition
            label="%DeclarationViewBackgroundColor.label"
            categoryId="org.eclipse.jdt.ui.presentation"
            value="COLOR_INFO_BACKGROUND"
            id="org.eclipse.jdt.ui.DeclarationView.backgroundColor">

The Java source hover once had the same problem, but that was fixed using org.eclipse.jdt.internal.ui.text.java.hover.SourceViewerInformationControl#getVisibleBackgroundColor(Display).

We should move that method into org.eclipse.jdt.internal.ui.JavaUIPreferenceInitializer and then use it to initialize the DeclarationView.backgroundColor with a better color.
Comment 1 Markus Keller CLA 2015-09-15 13:21:24 EDT
(From Andrey Loskutov in bug 439884 comment #16)
> Created attachment 252653 [details]
> Open issues in N20150411-1500
Comment 2 Markus Keller CLA 2015-09-28 16:21:46 EDT
> initialize the DeclarationView.backgroundColor with a better color.

The declarative colorDefinition in the org.eclipse.ui.themes extension point is a beast. The only way to set a different default color is to use an IColorFactory, but we can't define this in org.eclipse.jdt.ui, since a colorFactory force-loads the declaring plug-in.

I'm going to cheat and just use an internal class in org.eclipse.ui.workbench. First part: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=62d6caebc347ec5c0929dda4f7e721356ec05e6a
Comment 3 Eclipse Genie CLA 2015-09-28 16:22:31 EDT
New Gerrit change created: https://git.eclipse.org/r/56899
Comment 5 Markus Keller CLA 2015-09-30 12:18:51 EDT
.