Bug 304111 - Organize imports removes nested classes
Summary: Organize imports removes nested classes
Status: CLOSED DUPLICATE of bug 303776
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.6 M6   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-26 16:39 EST by Andrew Niefer CLA
Modified: 2010-03-09 10:01 EST (History)
2 users (show)

See Also:


Attachments
example project (2.81 KB, application/octet-stream)
2010-02-26 16:39 EST, Andrew Niefer CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Niefer CLA 2010-02-26 16:39:53 EST
Created attachment 160371 [details]
example project

Organize imports will remove an import for a nested class if the parent is being collapsed into a .* import.  This leads to compile errors when the nested class is used without being qualifier with its parent.

See the attached project, organize imports on Test.java will remove the 
import java.util.Map.Entry;


In the project properties, "Number of imports needed for .*" is 3
Comment 1 Andrew Niefer CLA 2010-02-26 16:44:29 EST
This is using  I20100223-0800, I believe this is new because p2 uses organize imports on save so I would have noticed before.
Comment 2 Olivier Thomann CLA 2010-02-26 20:54:49 EST

*** This bug has been marked as a duplicate of bug 303776 ***
Comment 3 Satyam Kandula CLA 2010-03-08 05:16:28 EST
Verified for 3.6M6 using build I20100305-101
Comment 4 Frederic Fusier CLA 2010-03-09 10:01:11 EST
Verified for 3.6M6 using I20100307-2000 build.