Bug 470203 - [content assist] color/style matching characters in completion proposals
Summary: [content assist] color/style matching characters in completion proposals
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 4.6 M5   Edit
Assignee: Noopur Gupta CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on: 350000 482119
Blocks: 483888 484049 485762 487584 487666
  Show dependency tree
 
Reported: 2015-06-15 13:19 EDT by Lars Vogel CLA
Modified: 2016-02-11 09:10 EST (History)
6 users (show)

See Also:


Attachments
patch (8.22 KB, patch)
2015-10-20 09:51 EDT, Noopur Gupta CLA
no flags Details | Diff
Screenshot (18.80 KB, image/png)
2016-01-13 04:51 EST, Lars Vogel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2015-06-15 13:19:43 EDT
Once Bug 350000 is fixed, it would be nice if the LabelProvider used to display matches could highlight the matching parts. For example:

Button b = new Button(..);
b.selection -> Results in b.addSelectionListener 

would be great if Selection would be in bold.
Comment 1 Noopur Gupta CLA 2015-10-20 09:51:48 EDT
Created attachment 257381 [details]
patch

Attaching WIP patch based on current master branch. The patch is in working condition. Need to modify for substring completion and test further. Any early feedback on the patch would be great.
Comment 2 Dani Megert CLA 2015-10-24 04:10:46 EDT
(In reply to Noopur Gupta from comment #1)
> Created attachment 257381 [details] [diff]
> patch
> 
> Attaching WIP patch based on current master branch. The patch is in working
> condition. Need to modify for substring completion and test further. Any
> early feedback on the patch would be great.

There is a problem with keyword proposals: on completion the matches are not shown but if one presses backspace and then enters the character again, it works.

I don't like that only some proposals show the matching characters. For example templates don't. Users can see this as being broken. Of course we can also add the code there, but we should try to find a solution that works for all proposals.

We also have to validate our feature against Code Recommenders. AFAIK they already do this and we don't want to break them.
Comment 3 Eclipse Genie CLA 2015-11-20 10:50:18 EST
New Gerrit change created: https://git.eclipse.org/r/60935
Comment 4 Eclipse Genie CLA 2015-11-20 10:51:11 EST
New Gerrit change created: https://git.eclipse.org/r/60936
Comment 6 Marcel Bruch CLA 2015-12-09 14:10:35 EST
(In reply to Dani Megert from comment #2)
> We also have to validate our feature against Code Recommenders. AFAIK they
> already do this and we don't want to break them.

To repeat in Bugzilla what was said at EclipseCon: We are happy to remove our highlighting in favor of more general an API provided by JDT.

I kindly ask for a heads up via Mail or Bugzilla a few weeks before this feature will be released so that we can pick up the changes.
Comment 7 Dani Megert CLA 2015-12-09 14:44:50 EST
(In reply to Marcel Bruch from comment #6)
> (In reply to Dani Megert from comment #2)
> > We also have to validate our feature against Code Recommenders. AFAIK they
> > already do this and we don't want to break them.
> 
> To repeat in Bugzilla what was said at EclipseCon: We are happy to remove
> our highlighting in favor of more general an API provided by JDT.
> 
> I kindly ask for a heads up via Mail or Bugzilla a few weeks before this
> feature will be released so that we can pick up the changes.

Marcel, I suggest you take a look at the initial API that we release for M4 (see comment 5). We did not yet release the JDT part, since there are life-cycle issues with the font.
Comment 8 Eclipse Genie CLA 2015-12-10 10:25:49 EST
New Gerrit change created: https://git.eclipse.org/r/62382
Comment 10 Lars Vogel CLA 2016-01-12 08:15:36 EST
I think we should relabel the bug report, AFAICS the styling it not specific to substring completion (which is good).
Comment 13 Lars Vogel CLA 2016-01-13 04:51:50 EST
Created attachment 259148 [details]
Screenshot

Highlighting for templates look different than for methods. Not sure if that is intended but IMHO this looks strange. See screenshot.
Comment 14 Lars Vogel CLA 2016-01-13 04:54:11 EST
.
Comment 15 Dani Megert CLA 2016-01-13 09:53:41 EST
(In reply to Lars Vogel from comment #13)
> Created attachment 259148 [details]
> Screenshot
> 
> Highlighting for templates look different than for methods. Not sure if that
> is intended but IMHO this looks strange. See screenshot.

Templates are blue by default, so, that's not a bug, but the match should be highlighted with bold blue. Please file a separate bug. Thanks.