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 47500

Summary: [40cat] Fix imports - import from java.lang
Product: java Reporter: meliandra <meliandra>
Component: UnsupportedAssignee: Daniel Prusa <dprusa>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 4.x   
Hardware: PC   
OS: Windows ME/2000   
Issue Type: DEFECT Exception Reporter:

Description meliandra 2004-08-19 17:03:22 UTC
[ BUILD # : 200408121535 ]
[ JDK VERSION : J2SE 1.5.0 ]

The action "Fix imports" doesn't delete import statements like java.lang.String if you use a String variable.

I've tested it also with java.lang.Integer. If no Integer is used it deletes the import statement.

In my opinion all import from java.lang should be deleted.

It's the same if you import a class from the same package.

All import from the same package should be deleted.

----------------
Is it possible to have a list with all import statement that will be deleted. Then the user selects the checkboxes of all import statements he will delete.
If got a lot of java classes that are generated with a tool from a rose model. In this java classes I have a lot of unneccessary import. But this is a area I'm not allowed to make changed. Due to if I recreate the classes from rose it overwrites this section.
--------------

Nice functionality :-)
Comment 1 pzajac 2004-08-19 17:04:46 UTC
reassigned to java 
Comment 2 Daniel Prusa 2004-09-01 13:27:06 UTC
Checking in JavaFixAllImports.java;
/cvs/editor/src/org/netbeans/modules/editor/java/JavaFixAllImports.java,v
 <--  JavaFixAllImports.java
new revision: 1.17; previous revision: 1.16