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.
Build ID: 200609161800 (Netbeans 6.0 M3) Steps To Reproduce: Move Inner Class 'Inner' on the following: import static java.lang.Math.E; public class A { class Inner { public void doit() { foo(); double e= E; } } static void foo(){}; } yields the following refactored 'Inner' class: class Inner { public Inner(A a) { this.a = a; } private final A a; public void doit() { this.a.foo(); double e = E; } } Note: the problem is only with the static imported method 'E' but not with static method 'foo'
Move Inner To Outer Level not implemented in 6.0 so far.
reproducible in nb 6.1
GeneratorUtilities.importFQNs() does not work for static imports. Basically, the refactorings removes ClassTree 'Inner', adds it to new CompilationUnitTree, takes existing IdentifierTree 'E' from 'double e= E;', calls GeneratorUtilities.importFQNs() passing the tree. The same works for non-static imports as expected.
Overtake.
reproducible with 090413
The source code after refactoring is compilable. jet-main: #dbac5af29086
Integrated into 'main-golden', will be available in build *200905230201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/dbac5af29086 User: Rastislav Komara <moonko@netbeans.org> Log: #100308: [Move Inner To Outer Level] Move Inner does not work with statically imported methods