Bug 457765 - [clean up][save actions] "Correct indentation" does not honor formatter on/off tags
Summary: [clean up][save actions] "Correct indentation" does not honor formatter on/of...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.4.1   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 464930 466608 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-01-16 19:52 EST by Ian Graham CLA
Modified: 2015-12-30 10:28 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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. ***