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 51152 - Fix Imports removes all inner class imports.
Summary: Fix Imports removes all inner class imports.
Status: CLOSED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-04 11:06 UTC by Dusan Balek
Modified: 2007-11-05 13:44 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dusan Balek 2004-11-04 11:06:25 UTC
Using the Fix Imports action (Alt+Shift+F), all
inner class import statements are incorrectly
removed (see Issue 51121 for more details).
Comment 1 Dusan Balek 2004-11-04 12:13:04 UTC
Fixed in [maintrunk].

Since inner classes cannot be imported by package imports, a check for
inner class imports is added to the code that removes import
statements of classes already imported by some package imports.

Checking in JavaFixAllImports.java;
/cvs/editor/src/org/netbeans/modules/editor/java/JavaFixAllImports.java,v
 <--  JavaFixAllImports.java
new revision: 1.23; previous revision: 1.22
done

Mila, could you please review the fix.

Visual diff:
http://editor.netbeans.org/source/browse/editor/src/org/netbeans/modules/editor/java/JavaFixAllImports.java.diff?r1=1.22&r2=1.23
Comment 2 Miloslav Metelka 2004-11-04 14:49:37 UTC
I approve the fix.
Comment 3 Jaromir Uhrik 2004-11-05 10:41:13 UTC
The fix works fine in main trunk build #200411042020; jdk1.5.0_01-b05;
WinXP.
Comment 4 psuk 2004-11-05 12:30:25 UTC
Setting TM=>4.1. Change it to 4.0 once it's integrated in release40
branch.
Comment 5 Dusan Balek 2004-11-05 12:44:59 UTC
Integrated into [release40].

Checking in JavaFixAllImports.java;
/cvs/editor/src/org/netbeans/modules/editor/java/JavaFixAllImports.java,v
 <--  JavaFixAllImports.java
new revision: 1.22.4.1; previous revision: 1.22
done
Comment 6 Jaromir Uhrik 2004-11-08 10:54:59 UTC
The fix works fine in release40 build #200411072021; jdk1.5.0_01-b05.