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 100438

Summary: Fixing imports on remove
Product: java Reporter: Jan Pokorsky <jpokorsky>
Component: SourceAssignee: Pavel Flaska <pflaska>
Severity: blocker CC: jlahoda, sdedic
Priority: P1    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 90254    

Description Jan Pokorsky 2007-04-10 10:48:35 UTC
In case you add some new Tree via the TreeMaker imports are resolved
automatically. It would be great if the same would work for removing Trees so
unused imports would be thrown away on commit.

Of course the best would be an automatic support. But API for the Fix Import
action would be welcome too.
Comment 1 Pavel Flaska 2007-04-13 14:31:39 UTC
It is up to next discussion if it is should be automatic or not. -- I vote for
non-automatic (i.e. for API call). But definitely should be somehow supported.
Comment 2 Pavel Flaska 2007-07-17 16:54:25 UTC
Not sure, but perhaps we could use parts of existing implementation in hints, adding Honza to cc.
Comment 3 Jiri Prox 2008-04-11 00:51:56 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 4 Svata Dedic 2013-12-02 14:31:01 UTC
No votes, 5 years old; I am not saying the automatic import removal is not a valid feature, but I am not sure it should be on each code change.
Comment 5 Jan Lahoda 2013-12-02 15:34:59 UTC
FWIW, we also have "remove unused imports on save" for some time now.