Bug 457765

Summary: [clean up][save actions] "Correct indentation" does not honor formatter on/off tags
Product: [Eclipse Project] JDT Reporter: Ian Graham <igraham>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, dominik.wezel, haftsteind
Version: 4.4.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Ian Graham CLA 2015-01-16 19:52:06 EST
If you have Formatter Off/On tags enabled(eg. @formatter:off) and you disable formatting for a section of code, then the "Clean Up" and "Save Actions" feature "Correct indentation" should honor the requested disablement but it does not.

This is most annoying with a method chaining style of code, like that below:

> <pre>
> // @formatter:off
>         queryV1.clone()
>             .measure("PFE")
>             .counterparty("Bank1")
>             .validateThatResultIs(780.0);
> // @formatter:on
> </pre

The "Correct indentation" feature will unfortunately align everything under the first line.
Comment 1 Dani Megert CLA 2015-05-06 12:15:20 EDT
*** Bug 466608 has been marked as a duplicate of this bug. ***
Comment 2 Mateusz Matela CLA 2015-12-30 10:28:50 EST
*** Bug 464930 has been marked as a duplicate of this bug. ***