Community
Participate
Working Groups
Hi, I have this class package a; class A { class B { class C { } } } Then I place the cursor over the B class and execute the "Move member type to new file" refactoring. It works well, but in the new file B.java I have this incorrect import sentence: import a.A.B.C; that should be omitted, because C is a nested class from B directly accessible without any import sentece.
Hi, I just tried David's example, but I have no errors when converting B to Top-level with Eclipse 3.3. However, I found another example where the problem certainly occurs: package a; public class A { public static class B { void b(C c) { } public class C { } } } Now, select B and choose "Refactor => Convert Member Type to Top Level", hit OK. The result is: package a; import a.A.B.C; public class B { void b(C c) { } public class C { } } and the import line gives a compilation error. The problem arouses when B has a method with a parameter type that refers to C. If you remove b(C) method, the result is correct.
*** Bug 150064 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of bug 310510 ***