user1141672
user1141672

Reputation:

How to ignore line wrapping in Eclipse?

I still use Line wrapping feature of Eclipse to format my java code. I don't want Eclipse join wrapped lines automatically, so I checked "Never join already wrapped lines", but when I format my code, it still join wrapped lines.

Example:

return ((this.isVertical == aLine.isVertical) &&
        (Math.abs(this.a - aLine.a) <= EPSILON) &&
        (Math.abs(this.b - aLine.b) <= EPSILON));

Formatted code:

return ((this.isVertical == aLine.isVertical) &&
        (Math.abs(this.a - aLine.a) <= EPSILON) && (Math.abs(this.b - aLine.b) <= EPSILON));

Please tell me how can I fix it. Thanks!

Upvotes: 3

Views: 524

Answers (1)

Matthew Farwell
Matthew Farwell

Reputation: 61695

In Workspace->Preferences-Java->Code Style->Formatter, Edit the profile, and Line Wrapping tabs, and select Expressions. Lots and lots of options there.

Upvotes: 3

Related Questions