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.
Created attachment 102388 [details] Not working code completion when creating new debugger watches. Product Version: NetBeans IDE 7.0 M2 (Build 201010121358) Java: 1.6.0_22; Java HotSpot(TM) Client VM 17.1-b03 System: Linux version 2.6.31-22-generic running on i386; UTF-8; en_US (nb) Userdir: /home/cesilko/.netbeans/7.0m2 Description: ============ Code completion is very unreliable in "New watch" dialog again. Sometimes it offers "System" for "Sys|" and that's all, sometimes it shows "No suggestions" but mainly it shows "abstract", "class", "enum" and the other Java keywords - see attached screenshot. Steps to reproduce: =================== 1. Launch NetBeans 7.0 development build with empty user directory. 2. Via "File > New Project..." create new Java Application sample project. 3. Invoke "Debug > New Watch..." from main menu. 4. Type "Sys" into "Watch Expression" field and press Ctrl+Space. 5. "System" option will not be displayed and you will see only Java keywords.
I've finally reproduced it. It depends on where a cursor in a Java file is. The code-completion uses the context from the selected file. If you select a line upon "package" statement, there's nothing to complete, therefore you get just some keywords. If you select a line inside the class body, you get completion for System, etc.
Context of the code-completion is set to a method body. This should fix the completion content. Fixed in changeset: 180312:ebe7c7bef5fc http://hg.netbeans.org/main/rev/ebe7c7bef5fc
Verified in NetBeans IDE 7.0 development build #201011030000.