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 24159 - Import Management: Shouldn't it suggest a package for unresolved names
Summary: Import Management: Shouldn't it suggest a package for unresolved names
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
: 24158 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-05-29 02:50 UTC by eadams
Modified: 2007-09-26 09:14 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 eadams 2002-05-29 02:50:47 UTC
I had an unresolved identifier.  I had entered:

    JButton btn = new JButton("Hello");

Step 1 of IMT found the unresolved identifier and allowed me to specify
its package.  I expected the IMT to try to find the package, especially
since it is from the JDK.  Ideally, it would be able to find a package
anywhere in my classpath.  Of course, it needs to deal with duplicates
but that would be part of the value of IMT.

I'm guessing that this is an enhancement request as I don't know 
the original design.
Comment 1 Svata Dedic 2002-05-29 06:58:25 UTC
Hmm... it would be *very* nice if we had access to the Editor's parser
database, so far the only cross-reference of classes in the IDE.
There's a list of "well-known packages" in IMT's settings, the tool
will try to look in them for an unresolved identifiers, if you permit
it to guess (set Guessing strategy to "look in well-known packages").
This is an approximation of having a real cross-reference data (we'll
get better with MDR-based models).
Comment 2 Svata Dedic 2002-05-29 06:58:56 UTC
*** Issue 24158 has been marked as a duplicate of this issue. ***
Comment 3 Tomas Hurka 2002-05-29 08:31:02 UTC
Already implemented. See issue #19813.
Comment 4 eadams 2002-05-29 08:54:30 UTC
I guess the remaining question is whether or not 
the default for the Guessing Strategy should be
to Search.  Given that the Well-Known packages
are very standard, changing the default seems
reasonable.

However, we need to keep in mind things like FFJ
Mobile Edition which would need the ability to
dynamically change the default.  I don't know if
such an ability exists.