http://www.jindent.com |
|
Next: Qualifiers |
Wrap before left parentheses ( |
always
:
void method() { callMethod (argumentOne, argumentTwo); ... } |
never
:
void method() { callMethod(argumentOne, argumentTwo); ... } |
on demand
:
void method() | { | callMethod | (argumentOne, argumentTwo); | ... | } | |
if line exceeds
works a bit different:
void method() | { | callMethod(argumentOne, argumentTwo); ... | } | |
argumentTwo
exceeds the specified maximal line length,
therefore we consider this case as 'the line exceeds maximal line length'
and it will be wrapped after its left parenthesis:
void method() | { | callMethod | (argumentOne, argumentTwo); | ... | } | |
See also: | Indentation of wrapped left parentheses ( |
Indentation of wrapped left parentheses ( |
See also: | Wrap before left parentheses ( |
Wrap first argument |
always
:
void method() { callMethod( argumentOne, argumentTwo, argumentThree); ... } |
never
:
void method() { callMethod(argumentOne, argumentTwo, argumentThree); ... } |
on demand
:
void method() | { | aPrettyLongObjectName.callMethod( | argumentOne, argumentTwo); | ... | } | |
if line exceeds
works a bit different:
void method() | { | callMethod(argumentOne, argumentTwo); ... | } | |
argumentTwo
exceeds the specified maximal line length,
therefore we consider this case as 'the line exceeds maximal line length'
and first argument will be wrapped:
void method() | { | callMethod( | argumentOne, argumentTwo); | ... | } | |
Indentation of first wrapped argument |
See also: | Wrap first argument |
Wrap all other arguments |
always
:
void method() { callMethod(argumentOne, argumentTwo, argumentThree); ... } |
never
:
void method() { callMethod(argumentOne, argumentTwo, argumentThree); ... } |
on demand
:
void method() | { | callMethod(argumentOne, argumentTwo, | argumentThree); | ... | } | |
if line exceeds
works a bit different:
void method() | { | callMethod(argumentOne, argumentTwo, argumentThree); ... | } | |
argumentThree
exceeds the specified maximal line length,
therefore we consider this case as 'the line exceeds maximal line length' and all
arguments will be wrapped:
void method() | { | callMethod(argumentOne, | argumentTwo, | argumentThree); | ... | } | |
Wrap right parentheses ) |
always
:
void method() { callMethod(argumentOne, argumentTwo ); ... } |
never
:
void method() { callMethod(argumentOne, argumentTwo); ... } |
on demand
:
void method() | { | callMethod(argumentOne, argumentTwo ); | ... | } | |
if line exceeds
works a bit different:
void method() | { | callMethod(argumentOne, argumentTwo, argumentThree); ... | } | |
argumentThree
exceeds the specified maximal line length,
therefore we consider this case as 'the line exceeds maximal line length'
and right parenthesis will be wrapped:
void method() | { | callMethod( | argumentOne, | argumentTwo, | argumentThree | ); | ... | } | |
if line exceeds
too. Indentation of wrapped right parentheses ) |
void method() | { | callMethod( | argumentOne, | argumentTwo, | argumentThree | ); | ... | } | |
void method() | { | callMethod( | argumentOne, | argumentTwo, | argumentThree | ); | ... | } | |
See also: | Wrap right parentheses ) |
Wrap before left parentheses ( |
always
:
public void method() { callMehthodA(callMethodB (argumentOne, argumentTwo)); ... } |
never
:
public void method() { callMethodA(callMethodB(argumentOne, argumentTwo)); ... } |
on demand
:
public void method() | { | callMethodA(callMethodB | (argumentOne, argumentTwo)); | ... | } | |
if line exceeds
works a bit different:
public void method() | { | callMethodA(callMethodB(argumentOne, argumentTwo)); ... | } | |
argumentTwo
exceeds the specified maximal line length,
therefore we consider this case as 'the line exceeds maximal line length'
and it will be wrapped after its left parenthesis:
public void method() | { | callMethodA(callMethodB | (argumentOne, argumentTwo)); | ... | } | |
See also: | Indentation of wrapped left parentheses ( |
Indentation of wrapped left parentheses ( |
See also: | Wrap before left parentheses ( |
Wrap first argument |
always
:
public void method() { callMethodA(callMethodB( argumentOne, argumentTwo, argumentThree)); ... } |
never
:
public void method() { callMethodA(callMethodB(argumentOne, argumentTwo, argumentThree)); ... } |
on demand
:
public void method() | { | aPrettyLongObjectName.callMethod(callAnotherMethod( | argumentOne, argumentTwo)); | ... | } | |
if line exceeds
works a bit different:
public void method() | { | callMethodA(callMethodB(argumentOne, argumentTwo)); ... | } | |
argumentTwo
exceeds the specified maximal line length,
therefore we consider this case as 'the line exceeds maximal line length'
and first argument will be wrapped:
public void method() | { | callMethodA(callMethodB( | argumentOne, argumentTwo)); | ... | } | |
Indentation of first wrapped argument |
See also: | Wrap first argument |
Wrap all other arguments |
always
:
public void method() { callMethodA(callMethodB(argumentOne, argumentTwo, argumentThree)); ... } |
never
:
public void method() { callMethodA(callMethodB(argumentOne, argumentTwo, argumentThree)); ... } |
on demand
:
public void method() | { | callMethodA(callMethodB(argumentOne, argumentTwo, argumentThree(); | ... | } | |
if line exceeds
works a bit different:
public void method() | { | callMethodA(callMethodB(argumentOne, argumentTwo, argumentThree)); ... | } | |
argumentThree
exceeds the specified maximal line length,
therefore we consider this case as 'the line exceeds maximal line length' and all
arguments will be wrapped:
public void method() | { | callMethodA(callMethodB(argumentOne, | argumentTwo, | argumentThree)); | ... | } | |
Wrap right parentheses ) |
always
:
public void method() { callMethodA(callMethodB(argumentOne, argumentTwo )); ... } |
never
:
public void method() { callMethodA(callMethodB(argumentOne, argumentTwo)); ... } |
on demand
:
public void method() | { | callMethodA(callMethodB(argumentOne, argumentTwo )); | ... | } | |
if line exceeds
works a bit different:
public void method() | { | callMethodA(callMethodB(argumentOne, argumentTwo, argumentThree)); ... | } | |
argumentThree
exceeds the specified maximal line length,
therefore we consider this case as 'the line exceeds maximal line length'
and right parenthesis will be wrapped:
public void method() | { | callMethodA(callMethodB( | argumentOne, | argumentTwo, | argumentThree | )); | ... | } | |
if line exceeds
too. Indentation of wrapped right parentheses ) |
public void method() | { | callMethodA(callMethodB( | argumentOne, | argumentTwo, | argumentThree | )); | ... | } | |
public void method() | { | callMethodA(callMethodB( | argumentOne, | argumentTwo, | argumentThree | )); | ... | } | |
See also: | Wrap right parentheses ) |
Wrap chained constructor and method calls on demand |
newLongClassName() -> getObject() -> getAnotherObject() -> | getAnotherObjectAgain() -> getDimension() -> getWidth(); | | // ... | newLongClassName().getObject().getAnotherObject().getAnotherObjectAgain(). | getDimension().getWidth(); | |
newLongClassName() -> getObject() -> getAnotherObject() -> getAnotherObjectAgain() -> getDimension() -> getWidth(); // ... newLongClassName().getObject().getAnotherObject().getAnotherObjectAgain().getDimension().getWidth(); |