Bug 466608 - [save actions] Correct indentation does not handle formatter on/off tags
Summary: [save actions] Correct indentation does not handle formatter on/off tags
Status: CLOSED DUPLICATE of bug 457765
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.4.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-06 11:58 EDT by Daniel Haftstein CLA
Modified: 2015-05-06 12:15 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Haftstein CLA 2015-05-06 11:58:28 EDT
I am working on a parameterized junit-test and would like to keep the following formatting for readability:

    public static Collection<Object[]> testData() {
        return Arrays.asList(new Object[][] {
// @formatter:off
                { new Object(),
                  new Object() },
                { new Object(),
                  new Object() }
                  // @formatter:on
                });
    }


unfortunately, the save action for indentation produces the following result:

// @formatter:off
                { new Object(),
                    new Object() },
                    { new Object(),
                        new Object() }
                    // @formatter:on

It would be nice if the save actions for formatting would work together with the on/off-tags.
Comment 1 Dani Megert CLA 2015-05-06 12:15:20 EDT

*** This bug has been marked as a duplicate of bug 457765 ***