tags:

views:

1078

answers:

2

Is there a way to get eclipse to stop erasing existing line breaks? If I have a method signature like this, I can't figure out how to get eclipse to leave it alone:

void foo(
    int arg1,
    int arg2,
    int arg3,
    int arg4)
{
    // ...
}

With various settings it will either collapse the arguments down to one line, or wrap them at some margin like this:

void foo(
    int arg1, int arg2,
    int arg3, int arg4)
{
    // ...
}

With "Wrap all elements, every element on a new line" it does preserve this whitespace, but it will ALWAYS wrap, which isn't what I want. I'd like eclipse to apply formatting for indentation and braces and such, just without ever deleting (or inserting) any line breaks.

+2  A: 

Eclipse 3.5 supports this. (It hit release candidate a a few days ago, so could be worth checking out)

tunaranch
+5  A: 
VonC