Bug 383296 - [subwords] Eclipse 3.7 - different subword completion proposal sorting
Summary: [subwords] Eclipse 3.7 - different subword completion proposal sorting
Status: CLOSED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Recommenders (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Marcel Bruch CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2012-06-22 07:53 EDT by Andreas Schoeneck CLA
Modified: 2019-07-24 14:35 EDT (History)
1 user (show)

See Also:


Attachments
Eclipse installation information (771.29 KB, text/plain)
2012-06-26 08:36 EDT, Andreas Schoeneck CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schoeneck CLA 2012-06-22 07:53:02 EDT
The sorting of the proposals of the subword completion differ depending on whether it is the default content assist or a cycling content assist.

STR:
1. Set up content assist (Java -> Editor -> Content Assist -> Advanced) as follows:
- In the upper list, deactivate any Java * Proposal on top of "Java Subwords Proposals (Recommenders)" - which shall be activated.
- In the list below, Activate "Java Subwords Proposals (Recommenders)" and, for convenience, move it to the top.

2. Set up a Java project (maybe use Maven/m2e) that uses EasyMock (http://www.easymock.org)

3. In a Java method, after importing org.easymock.EasyMock, type

   EasyMock.eq

=> You are presented a list with the aryEq methods on top (sorted alphabetically).

3b. then cycle through the other content assists until you get the Subword Proposals

=> The list presented now has the exact matches "eq" on top.

Actual results:
The proposals' sorting differ depending on how the completion is invoked.

Expected results:
The proposals are identically sorted, preferably with the exact-match-first style.
Comment 1 Marcel Bruch CLA 2012-06-26 07:50:46 EDT
I'm not able to reproduce you scenario yet. The proposals 'eq' proposals are listed above 'aryEq' independent on which content assist list (default or second).

We changed the ranking quite a few times in the past. Maybe you are using a slightly outdated version? Could you please specify which version of subwords (including build id) and Eclipse your are using - and from which update site you installed subwords from? 


If you are using e4.2/3.8, could you try the latest version from [1]?
If you are using e3.7, could you try the latest version from [2]?


[1] http://download.eclipse.org/recommenders/updates/dev/e42/
[2] http://download.eclipse.org/recommenders/updates/dev/e37/
Comment 2 Andreas Schoeneck CLA 2012-06-26 08:36:44 EDT
Created attachment 217880 [details]
Eclipse installation information

Find my Eclipse info attached. I am able to reproduce the issue with this configuration.

Shorthand: Latest dev version of Code Recommenders, Eclipse Indigo SR2
Comment 3 Andreas Schoeneck CLA 2012-06-26 08:38:08 EDT
Seems to be more like an Indigo SR1 release.
Comment 4 Marcel Bruch CLA 2012-06-26 09:04:32 EDT
I see. In 3.7 the ranking of the proposals is determined at the point ctrl+space was pressed. Triggering Easymock.<ctrl+space>eq leads to the sorting you mentioned ('aryEq*' before 'eq*').

For 3.8/4.2 I provided a patch that enables JDT's completion engine to resort proposals after every new letter. In 3.8/4.2, when triggering on Easymock.<ctrl+space> you will still find 'aryEq*' above 'eq*' but after your press 'e' all 'eq*' proposal will be listed above 'aryEq*' as prefix matching scores higher than aryEq*. To summarize, what you are looking for should be in 3.8/4.2 already.



Sorry, this is a limitation in JDT 3.7. There are no plans to backport this patch to 3.7.

Simplest solution: update to 3.8 or 4.2 tomorrow ;)

HTH,
Marcel
Comment 5 Andreas Schoeneck CLA 2012-06-26 09:06:28 EDT
> Sorry, this is a limitation in JDT 3.7. There are no plans to backport this
> patch to 3.7.
> 
> Simplest solution: update to 3.8 or 4.2 tomorrow ;)
> 
> HTH,
> Marcel

Never mind, this is what I planned anyway. :)