Continuation Indent

I am using IDEA CE 9.0.1, using four space indentation for my Java code.  I want to have line-wrapped continuations be two spaces, with all of the continued lines at that single two-space indent, e.g.:

    if (someLongStuff() && moreStuff()
            && whyNotOneMore(foo, bar, bletch)
            && spam)) {
    }

I've not been able to configure IDEA to do exactly that style.  With Code Style / General / Use tab character = false, Tab size = 4, Indent = 4, Continuation Indent = 2, my code comes out looking like this:

    if (someLongStuff() && moreStuff()
            && whyNotOneMore(foo, bar, bletch)
              && spam)) {
    }

Notice that extra 2-char indent on the "&& spam" line.  Does anyone know how to achieve this indent style?

Thanks,

Nick

1 comment

Hi Nick,

Just checked your use-case under IDEA CE 9.0.2 - it works as expected, i.e. no extra indent is used within '&& spam'.

Can I ask you to do the following:

  1. Check the use-case under IDEA 9.0.2;
  2. Submit your code formatting settings xml if you still have the problem;


Regards, Denis

0

Please sign in to leave a comment.