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 252362

Summary: Annoying instanceof auto-completion
Product: java Reporter: terje7601
Component: EditorAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: normal CC: markiewb
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

Description terje7601 2015-05-12 13:58:25 UTC
NetBeans is much too eager to auto-complete "instanceof", which is annoying. I can only speak for myself, but I use instanceof very seldom. In my opinion, it should never be proposed for auto-completion at all, unless maybe when you actually started typing it already.

Consider the class below:
- when the cursor is at "<cursor1>", it auto-completes "instanceof ", even though it's much more likely that I want a condition like "== null" or "!= null"
- when the cursor is at "<cursor2>", it auto-completes "instanceof ", even though it's much more likely that I actually want to do another chained method call (& get an overview of all String methods), but didn't type the dot yet.

public class NewClass {
	
	public static void main(String[] args) {
		Object o = null;
		if(o <cursor1>) {
			
		}
		
		o.toString()<cursor2>;
	}
	
}

PS: this issue is related to issue 248988

Product Version: NetBeans IDE Dev (Build 201504230001)
Updates: Updates available
Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)