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 - Annoying instanceof auto-completion
Summary: Annoying instanceof auto-completion
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-12 13:58 UTC by terje7601
Modified: 2016-04-15 15:18 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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)