Bug 466002 - [subwords] Wrong highlighting of {@link ...} and {@value ...} proposals
Summary: [subwords] Wrong highlighting of {@link ...} and {@value ...} proposals
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Recommenders (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Andreas Sewe CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2015-05-01 01:06 EDT by Marcel Bruch CLA
Modified: 2019-07-24 14:35 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 Marcel Bruch CLA 2015-05-01 01:06:02 EDT
Subwords cannot properly highlight proposals that have a prefix like {@link ...}, {@value ...}.  We need some kind of offset in the processable proposal API to fix that.



See bug 465898 for examples and more details.
Comment 1 Andreas Sewe CLA 2015-06-01 10:18:32 EDT
(In reply to Marcel Bruch from comment #0)
> Subwords cannot properly highlight proposals that have a prefix like {@link
> ...}, {@value ...}.  We need some kind of offset in the processable proposal
> API to fix that.

Some thoughts on this that came up while fixing Bug 465898:

- Javadoc tag proposals are just ordinary JavaCompletionProposal, but they do have a special kind (JAVADOC_INLINE_TAG, etc.), so we can distinguish them.

- When completing with a prefix of "{@" you get the proposal "{@link}" (already highlighted correctly).

- When completing with a prefix of "L" you get the the proposal "{@link List}" (highlighting off by 7)
Comment 2 Andreas Sewe CLA 2015-06-01 14:03:32 EDT
(In reply to Andreas Sewe from comment #1)
> (In reply to Marcel Bruch from comment #0)
> > Subwords cannot properly highlight proposals that have a prefix like {@link
> > ...}, {@value ...}.  We need some kind of offset in the processable proposal
> > API to fix that.
> 
> Some thoughts on this that came up while fixing Bug 465898:
> 
> - Javadoc tag proposals are just ordinary JavaCompletionProposal, but they
> do have a special kind (JAVADOC_INLINE_TAG, etc.), so we can distinguish
> them.
> 
> - When completing with a prefix of "{@" you get the proposal "{@link}"
> (already highlighted correctly).
> 
> - When completing with a prefix of "L" you get the the proposal "{@link
> List}" (highlighting off by 7)

The situation is slightly tricker for method or field proposals of the form

  {@link Collections#emptyList()}

or

  {@value Collections#EMPTY_LIST}

as their matching area starts at a variable offset.

I have pushed a change to Gerrit that should cover these cases, though [1]. Of course, this requires some careful testing.

[1] <https://git.eclipse.org/r/#/c/49124/>
Comment 3 Johannes Dorn CLA 2015-06-02 14:23:03 EDT
Change is merged