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 190977 - No code completion when creating new watches/variables
Summary: No code completion when creating new watches/variables
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 7.0
Hardware: PC Linux
: P2 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-13 13:07 UTC by Jiri Kovalsky
Modified: 2010-11-03 17:21 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Not working code completion when creating new debugger watches. (30.88 KB, image/png)
2010-10-13 13:07 UTC, Jiri Kovalsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Kovalsky 2010-10-13 13:07:43 UTC
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.
Comment 1 Martin Entlicher 2010-10-14 14:48:10 UTC
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.
Comment 2 Martin Entlicher 2010-10-22 11:04:35 UTC
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
Comment 3 Jiri Kovalsky 2010-11-03 17:21:21 UTC
Verified in NetBeans IDE 7.0 development build #201011030000.