Bug 485762 - [content assist] Use bold blue for template substring matches
Summary: [content assist] Use bold blue for template substring matches
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.6 M5   Edit
Assignee: Noopur Gupta CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 350000 470203
Blocks: 483888 484049
  Show dependency tree
 
Reported: 2016-01-13 09:57 EST by Lars Vogel CLA
Modified: 2016-01-27 10:41 EST (History)
6 users (show)

See Also:
daniel_megert: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2016-01-13 09:57:00 EST
+++ This bug was initially created as a clone of Bug #470203 +++

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=470203#c15

Substring matches for templates are blue by default, therefore the match should be highlighted with bold blue.
Comment 1 Noopur Gupta CLA 2016-01-14 06:10:45 EST
Strings#markMatchingRegions uses StyledString#setStyle which overwrites the foreground color from previous styler when bold styler is applied.

To handle this, I am creating a new styler in TemplateProposal#emphasizeMatch which sets the bold font using BoldStylerProvider#getBoldFont and also sets the foreground color to JFacePreferences.COUNTER_COLOR.

Instead of pushing the fix to Gerrit for review, I accidentally pushed it to master:
http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=ae2fb3ae8a2f8928a19a5ae8fee785d9683e58f0

Dani, please have a look.
Comment 2 Lars Vogel CLA 2016-01-14 06:15:23 EST
FYI - As a user the blue font has no value for me. 

Maybe you want to discuss in the JDT team if you change the blue font for templates to the default one? This might also result in a simpler code basis.
Comment 3 Dani Megert CLA 2016-01-15 04:13:40 EST
(In reply to Lars Vogel from comment #2)
> FYI - As a user the blue font has no value for me. 
> 
> Maybe you want to discuss in the JDT team if you change the blue font for
> templates to the default one? This might also result in a simpler code basis.

We render them differently since day one and won't change that.
Comment 4 Markus Keller CLA 2016-01-27 10:41:19 EST
Verified in I20160126-0800.