Community
Participate
Working Groups
Build ID: I20080617-2000 Steps To Reproduce: 1. Create class with inner class in it: class A { class B {} } 2. Create an instance of A class and assign to variable: A a = new A(); 3. Create an instance of B class: a.new B(); 4. Use QuickFix or Ctrl+2 to assign newly created object to variable. 5. Eclipse produces inapriopriate "B b = " instead of "A.B b = " and invalid import "import A.B" More information: Same thing happens when creating local variable or field, using QuickFix and Ctrl+2 as well. Solution should be tested also for inner classes inside inner class (like A.B.C c = b.new C())
Move to JDT/UI
This works for me using R3.4 and 3.5 M1: it adds the expected import only if needed. If you still see this please provide more detailed steps.
I can reproduce in 3.5M1, but only with A.java in the default package. See also bug 230300.
Please provide exact test case.
==> public class A { class B { } } public class C { void foo() { A a = new A(); a.new B(); } }
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.