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 262819

Summary: Go to Type Selection Order misleading
Product: java Reporter: bht <bht>
Component: NavigationAssignee: Tomas Zezula <tzezula>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 8.2   
Hardware: PC   
OS: Windows 8.1   
Issue Type: DEFECT Exception Reporter:

Description bht 2016-07-14 23:37:53 UTC
NetBeans IDE 8.2 Dev (Build 201607090002)

In Java, if the value used for "Go to Type" has multiple matches, where the entered value has a perfect match, and another much weaker match where substrings of the entered value match a larger name, then very often, the weaker match is focused, leading to incorrect selections.

Example:

Entered value: JdbcTeamTypeDao
Perfect match: JdbcTeamTypeDao
Weak match: JdbcTeamServiceTypeDao
Focused, selected value: JdbcTeamServiceTypeDao
List order: JdbcTeamServiceTypeDao, JdbcTeamTypeDao

It appears that the current algorithm is the selection of the first member of an alphabetically orderd list which is often wrong.
Comment 1 Tomas Zezula 2017-05-16 16:34:12 UTC
Added a possibility to switch the ordering to "Similarity" (levenshtein distance from the entered text to found item).
The ordering can be changed in the Tools/Options/Editor/Go To.
The default is kept unchanged - alphabetical sort, you need to change the option.

Fixed jet-main http://hg.netbeans.org/jet-main/rev/8f3a3358b27f
Comment 2 Quality Engineering 2017-05-18 01:53:17 UTC
Integrated into 'main-silver', will be available in build *201705180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/8f3a3358b27f
User: Tomas Zezula <tzezula@netbeans.org>
Log: #262819:Go to Type Selection Order misleading