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 255158 - Codecompletion suggest class over scope instance when using camel case
Summary: Codecompletion suggest class over scope instance when using camel case
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Completion & Templates (show other bugs)
Version: 8.1
Hardware: PC Windows 8.1
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-10 08:05 UTC by akobberup
Modified: 2015-09-16 01:27 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot (21.83 KB, image/png)
2015-09-10 08:05 UTC, akobberup
Details

Note You need to log in before you can comment on or make changes to this bug.
Description akobberup 2015-09-10 08:05:30 UTC
Created attachment 156036 [details]
Screenshot

In a method i have the folowing code:

List<OrganizerSelectionDTO> organizerSelections = new ArrayList<OrganizerSelectionDTO>();
for (FieldDTO dto : cReply.getDTOs()) {
	oSel{cursor}
}

the cursor is placed at {cursor}.

If i initiate codecompletion, the variables (and fields) that are available in this scope and can be completed after my input "oSel", is in the top of the codecompletion list. Below these are all classes that match the "oSel" criteria.

My normal assumption would be that codecompletion would select the variable "organizerSelections" variable, that is declared inside same method as i try to initiate codecompletion. However, it does not. It select "NoSuchFieldError", and i have to page up through the list to find the variable.

I hit this a thousand times a day, and it fustrates the crap out of the general coding experience. 
My estimate is that 99 times out of hundred, when i start typing like in the example, i would like to select the local variable (or class field) before some obscure class in a dependency that happens to match the camel case.
Comment 1 Dusan Balek 2015-09-15 09:49:46 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/2d5919729ece
Comment 2 akobberup 2015-09-15 09:51:58 UTC
Awesome awesome awesome - thank you so very much!
Comment 3 Quality Engineering 2015-09-16 01:27:13 UTC
Integrated into 'main-silver', will be available in build *201509160002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/2d5919729ece
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #255158 - Codecompletion suggest class over scope instance when using camel case - fixed.