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 65296

Summary: Code completion shows templates where they cannot be used
Product: java Reporter: _ tboudreau <tboudreau>
Component: UnsupportedAssignee: issues@java <issues>
Status: RESOLVED DUPLICATE    
Severity: blocker CC: rstrobl
Priority: P2    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: screen shot

Description _ tboudreau 2005-09-29 06:47:49 UTC
See attached screen shot the options available as completions of

this.s

are

static
String
switch (
synchronized 
System.err.println("");
System.out.println("");
stateChanged()

only the last one is a usable completion of "this.s" - everything else will be uncompilable.  There is  
enough information to detect this situation and avoid template completions - either check for the . as 
the previous token, or get the text back to the nearest preceding whitespace character, and only 
include templates that are exact matches.

This does deserve to be P2 - it removes most of the value of code completion if you have to hit the 
down arrow 6 times to skip invalid completions.
Comment 1 _ tboudreau 2005-09-29 06:48:22 UTC
Created attachment 25275 [details]
screen shot
Comment 2 Roman Strobl 2005-09-29 09:16:26 UTC
Thanks Tim, this one is already reported.

*** This issue has been marked as a duplicate of 63212 ***