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 96421 - On Fix Imports auto remove unused imports
Summary: On Fix Imports auto remove unused imports
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks: 47599
  Show dependency tree
 
Reported: 2007-02-23 11:15 UTC by dyegoleal
Modified: 2009-03-05 20:39 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 dyegoleal 2007-02-23 11:15:51 UTC
When i FIX THE IMPORTS in project... the IDE must remove the unused imports...
like eclipse. this is very usefull
Comment 1 Vitezslav Stejskal 2007-02-25 21:15:49 UTC
It used to do that, I have no idea why it's not working any more.
Comment 2 michael_n 2009-03-05 20:39:50 UTC
This is an ancient issue, but if google led me here, then so might it for others:

Somehow, my Netbeans 6.5 had a property set to disable auto-fix of unused imports. I couldn't find a property setting to
set or unset this in the GUI.  But, my config preferences contained the following:

$ cat
~/.netbeans/6.5/config/Preferences/org/netbeans/modules/java/editor/org.netbeans.modules.java.editor.imports.JavaFixAllImports.properties
#Tue Feb 24 14:22:47 PST 2009
removeUnusedImports=false


By just commentting out this property (or perhaps deleting the file), my "fix imports" (aka ctrl+I) worked once again to
removed unused imports.   

No idea what broke it in the first place (i.e., by setting this property), but now it's back to normal, business as usual.

Hope it helps any other googlers out there who come across this.

thx,
-m