Question

What I want (when formatting in Eclipse):

      Path file = write(FILE_SYSTEM.getPath(fileName), transactionStrings, 
            CHARSET, CREATE, TRUNCATE_EXISTING, WRITE);

What it is doing:

      Path file =
            write(FILE_SYSTEM.getPath(fileName), transactionStrings, CHARSET,
                  CREATE, TRUNCATE_EXISTING, WRITE);

Line length is 80, tab widths set to 3.

Was it helpful?

Solution

OK, found the solution.

  • Windows > Preferences > Java Code Style > Formatter > Edit
  • Line Wrapping > Expressions > Assignments > Line wrapping policy: Wrap all elements, except first element if not necessary.

OTHER TIPS

Set line length in Eclipse formatter (Window->Preferences->Java->Code style->Formatter) to higher value.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top