Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 133138 - Unnecessary imports added for member types
Summary: Unnecessary imports added for member types
Status: RESOLVED DUPLICATE of bug 131705
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Martin Aeschlimann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-24 07:08 EST by Frederic Fusier CLA
Modified: 2006-03-28 06:17 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Fusier CLA 2006-03-24 07:08:31 EST
Using build I20060322-1335.
Here's my test case
test/Test.java
  package test;
  public class Test {
	public class Level0 {
		public class Level1 {}
	}
  }
test/X.java
  package test;
  public class X {
  }

I'm editing X and I want to add fields using completion
  package test;
  public class X {
	Test.L|
  }

I got one proposal: "Level0 - test.Test" => OK
Select it and insert, I got following code:
  package test;
  import test.Test.Level0;
  public class X {
	Test.Level0
  }

I continue to finish my field declaration and fix compiler error:
  package test;
  import test.Test.Level0;
  public class X {
	Test.Level0 level0;
  }

Now I get an "Unused import" warning on the import line. I remove it and compiler does not complain (correct).

So, I would expect not to have the unnecessary import added while doing this scenario...
Comment 1 Markus Keller CLA 2006-03-24 07:22:36 EST
Martin, I think this is the same problem as bug 131705.
Comment 2 Martin Aeschlimann CLA 2006-03-28 06:17:18 EST

*** This bug has been marked as a duplicate of 131705 ***