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 75438

Summary: Editor hint for all suggested imports
Product: java Reporter: _ gsporar <gsporar>
Component: HintsAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: blocker CC: markiewb
Priority: P4    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description _ gsporar 2006-04-24 20:09:30 UTC
I had this:

public class ProductionReport {

And I changed it to this:

public class ProductionReport extends TopComponent implements ActionListener,
ChangeListener  {

The resulting editor hint had three options:

Add import for ChangeListener
Add import for ActionListener
Add import for TopComponent

It would be nice if there were a fourth:

Add import for all class references on this line

My suggested wording could use a bit of work....  :-)

As it is now, I have to repeatedly click the light bulb to get each import
added.  Admittedly, there are simple workarounds (Alt-Shift-F), but it would be
nice to have this in the editor hint.
Comment 1 Jiri Prox 2006-06-09 17:34:25 UTC
How it should behaves if there is conflict in imports (typicaly class List is in
several packages)?
Comment 2 _ gsporar 2006-06-09 23:25:59 UTC
>How it should behaves if there is conflict in imports?

I would say then it should behave the same way it does now.  In other words, do
not offer the new "add all imports needed for this line" option *unless* there
is a single unique list of required imports.  The down side, obviously, is that
the user interface will behave differently for different situations that might
*appear* to some users to be the same situation.  I would say that is a price
worth paying.