Hammurapi inspector for checking the indentation of the source code.
The parameter standard-indentation-level specifies the default
indentation for blocks in curly braces. There must be no difference in the
indentation of statements without sorrounding curly braces. Examples (with
standard-indentation-level = 2):
if (current.getType() == JavaTokenTypes.LCURLY) {
requiredColumn += indentLevel;
}
while (parent != null && parent instanceof Class) {
lassLevel++;
parent = parent.getParent();
}
If large expressions (e.g. in if-Statements) are longer than a single line it
is recommended to use a different indentation. This is useful for
distinguishing these expressions from the following Java blocks. In the same
way the indentation of long assignment values, parameter, lists, long chains
of method calls and throws-statement should be handled. This different
indentation is specified by the parameter expression-indentation-level
. Examples (with expression-indentation-level = 4):
if (current.getType() == JavaTokenTypes.LPAREN && parenthesisLevel++ == 0) {
requiredColumn += exprIndentLevel;
}
check((Token) aClass.getAst().getFirstToken(), getClassLevel(aClass),
(Token) aClass.getAst().getLastToken());
author: Jochen Skulj version: $Revision: 1.4 $ |