Community
Participate
Working Groups
I20080528-2000, same problem in 3.3.2 - Have this (normal tab indents, you may have to restore the tabs if Bugzilla screws them up): public class Try { void m() { // String arg = "xx"; System.out.println(arg); } } - Go to the compile error - Quick Fix 'Create local variable' => Was: public class Try { void m() { char[] arg; // String arg = "xx"; System.out.println(arg); } } => Expected ('char[] arg;' can also be before the outcommented line): public class Try { void m() { // String arg = "xx"; char[] arg; System.out.println(arg); } }
It's an AST rewriter issue. The comment got assigned to the existing statement and the new statement alligned to that one. As the line comment starts on the first line, the new statement is inserted there.
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. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. 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.