This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 241749

Summary: Subword Completion does not preselect exact method name
Product: editor Reporter: DanielBr
Component: Completion & TemplatesAssignee: Dusan Balek <dbalek>
Status: RESOLVED DUPLICATE    
Severity: normal CC: markiewb
Priority: P3    
Version: 7.4   
Hardware: PC   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: Shows the proposal in NB8.1

Description DanielBr 2014-02-12 09:13:30 UTC
I have "Subword Completion" turned on. 
Let's say there are 2 methods in my class named getName() and getDisplayName().
when I start typing "getNa", both methods appear in the suggestion list, which is correct, but it seems that the alphabetically first method is preselected.
Right now, I would always have to manually select "getName" no matter what I type, as every partial sequence of "getName" is also in "getDisplayName".
Instead, I would expect that the method that most exactly matches what I typed so far would be preselected.
Comment 1 DanielBr 2014-03-20 09:53:55 UTC
What makes this problem even worse is that the sequence already put is matched very generously with method names. Another example should help to understand what I mean by that: 

Type
"org.openide.nodes.Node node;
node.set"

The suggestions are:
"getPasteTypes
getPropertySets
getShortDescription
isExpert
setDisplayName
..."

I obviously wanted to find a method with the exact sequence "set" in its name. I get all methods which contain an "s", "e", and "t" somewhere in its name.
This would barely be a problem if 
1. exactly matching methods would be prioritized
2. methods that contain more of the letters put in exactly side by side would be prioritized.
Comment 2 markiewb 2015-03-26 22:50:53 UTC
Duplicate of 248010

*** This bug has been marked as a duplicate of bug 248010 ***
Comment 3 markiewb 2015-03-26 22:51:59 UTC
Created attachment 152868 [details]
Shows the proposal in NB8.1

See the screenshot for the fixed behaviour in NB8.1 provided by https://netbeans.org/bugzilla/show_bug.cgi?id=248010
Comment 4 DanielBr 2015-04-03 08:38:03 UTC
I don't really get why this is marked as the duplicate regarding that it is the older of the two bug entries, but as long as this issue is fixed, I'm happy.
Comment 5 markiewb 2015-04-03 08:46:15 UTC
(In reply to DanielBr from comment #4)
> I don't really get why this is marked as the duplicate regarding that it is
> the older of the two bug entries, but as long as this issue is fixed, I'm
> happy.

Because the commit for fix has been made in 248010 (the newer issue).