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 74703 - [EE-15] Code completion works for unknown types
Summary: [EE-15] Code completion works for unknown types
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Dusan Balek
URL: http://ui.netbeans.org/nonav/usabilit...
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-10 15:16 UTC by jrojcek
Modified: 2013-09-02 14:22 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jrojcek 2006-04-10 15:16:17 UTC
inding	
Participant invoked code completion with field that wasn't on classpath ("bean.|" - bean was a field of 
Test1Local type that wasn't on classpath). The code completion showed up offering basic items from 
Object, which was confusing because it looked like the completion didn't work properly.

Severity	
1 participant wrote the code manually without realizing that something was wrong.
A few other participants had the same problem.

Recommendation	
The code completion should say something like "Test1Local isn't on project classpath." and ideally, it 
should offer to add the right project on classpath, if the project that contains Test1Local is in the reach 
of the IDE (the project is open or it is on classpath of open project?).
Comment 1 Vitezslav Stejskal 2007-02-11 06:34:01 UTC
I am not sure how the IDE should decide what projects are in its 'reach', but
the current behavior in a dev build is not to offer anything if the type can't
be accessed on the project's classpath. IMO it's a correct behavior, even though
we might be able to try harder and do something a little bit more clever. Opinions?
Comment 2 jrojcek 2007-02-12 10:01:01 UTC
Yes exactly. This is a request to help the user realize he's trying to use something that's not on the 
classpath yet. In the dev build it works better, because it says "No Suggestions." in the code completion 
window. It would be better if it clearly said "No suggestions - TestLocal is not on classpath", or 
something similar.

In addition to that, it would be great if it helps the user to add TestLocal to classpath. You could look at 
all open projects and their classpaths. If you find it there, than you can offer the  user to use it.

It is similar to using a NetBeans API from a plugin module. You know which class you want to use, but 
you need to go setup dependency first and then you can use the API. Which is the other way around I 
believe. You want to use the class and the IDE should help you add the JAR that contains the class to 
classpath.
Comment 3 Jan Becicka 2007-10-17 14:20:18 UTC
This is not a bug.
Comment 4 Vitezslav Stejskal 2007-10-17 14:37:53 UTC
And it's not in the CC infra either.
Comment 5 Jiri Prox 2008-04-11 00:54:25 UTC
moving opened issues from TM <= 6.1 to TM=Dev