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 59960 - fix import related enhancement
Summary: fix import related enhancement
Status: RESOLVED DUPLICATE of bug 47599
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker with 2 votes (vote)
Assignee: issues@editor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-15 01:01 UTC by sviyer
Modified: 2008-04-24 09:34 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 sviyer 2005-06-15 01:01:22 UTC
JB 2005 foundation - free version has the following functionality.

Fix import - 
  removes un-necessary,un-used imports, 
  sorts them seperating each package block by an empty line, 
  configurable to include package decl or full class name decl.
  i.e. import javax.swing.*; or import javax.swing.JLabel;
  you can even configure the package depth.

NB does not have the above - please provide this.

In fact NB does "import resolving" which is brilliant and JB does have this
functionality.

But why can't the import resolving be done as you type. Why can't this be
configurable.  I notice that NB finds the class and hence provides code
completion for the relevant class. But after that you have to explicitly ask to
fix imports !!  why not have a configurable option such that the editor can
include the import as we type ? 

If the class is unresolved a window should pop up to say this and code
completion should not work ! 

If the class is ambiguous a window should pop up to allow selection and then the
code completion logic should kick in !!

This would be spectacular.

In a nutshell if code completion works , the editor already knows what should be
included.

cheers
Comment 1 sviyer 2005-06-15 01:47:03 UTC
Another feature is this:

 - when a code block is copied from java file to java file - relevant imports
should be optionally copied.

JB currently confirms via dialog box if the imports should be copied. This would
be good.
Comment 2 zeljkot 2008-04-24 09:34:56 UTC

*** This issue has been marked as a duplicate of 47599 ***