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.
Applying "Assign Return Value To New Variable" to a multiline statement also indents the lines following the first line. For example, applying the hint on private static void example() { System.out .append("foo") .append("bar"); } results in: private static void example() { PrintStream append = System.out .append("foo") .append("bar"); } This is inconsistent with the usual indentation behavior (upon pressing Enter, or using Source->Format) which uses the configured Continuation Indentation Size. I would suggest to have the hint only modify the first line, and leave the remaining lines of the statement unmodified. E.g. the result in the above example would be private static void example() { PrintStream append = System.out .append("foo") .append("bar"); } just as it would be when pressing Enter after "PrintStream append = System.out" and then typing ".append(...)".
*** Bug 223362 has been marked as a duplicate of this bug. ***
After fixing bug #224859, the standard indenter is used to indent the result in this case, and the indetation result should be the same as if the copied part of the code would be reindented. *** This bug has been marked as a duplicate of bug 224859 ***