Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Complementing Deepak Azad's answer, what you exactly need is the following:</p> <blockquote> <p><strong>Windows</strong>: Window → Preferences → Java → Code Style <br/> → Formatter → Edit → Line wrapping (tab)</p> <p><strong>Mac OS</strong>: ADT → Preferences → Java → Code Style <br/> → Formatter → Edit → Line wrapping (tab)</p> </blockquote> <p>Then, in the list at the left, select: </p> <blockquote> <p>Function Calls → Qualified invocations</p> </blockquote> <p>Now below this list, set <strong>Line wrapping policy</strong> to:</p> <blockquote> <p>Wrap all elements, except first element if not necessary</p> </blockquote> <p><strong>Check</strong>:</p> <blockquote> <p>Force split, even if line shorter than maximum line width</p> </blockquote> <p>Finally, set <strong>Indentation policy</strong> to (thanks <a href="https://stackoverflow.com/questions/6275785/wrapping-chained-method-calls-on-a-separate-line-in-eclipse-for-java#comment16795333_10446098">@Turbo</a>):</p> <blockquote> <p>Indent on column</p> </blockquote> <p>It should give you the exact behavior you asked for.</p> <hr> <p><strong>BONUS: Android Studio / IntelliJ Idea:</strong></p> <blockquote> <p><strong>Mac OS</strong>: Android Studio → Preferences (<code>Cmd +,</code>) → Editor → Code Style → Java → <em>Wrapping And Braces</em> tab → Chained method calls</p> </blockquote> <p>select</p> <blockquote> <p>Wrap always</p> </blockquote> <p>and check</p> <blockquote> <p>Align when multiline</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload