// if the comment is between parenthesis, there is no blank line
// preservation
// (if it's a one-line comment, a blank line is added after it).
- if (((pendingNewLines > 0 && (!isComment(token)))
- || (newLinesInWhitespace > 0 && (openParenthesisCount <= 1 && isComment(token))) || (previousCompilableToken == TokenNameLBRACE && token == TokenNameRBRACE))
+ if ((
+ (pendingNewLines > 0 && (!isComment(token)))
+ || (newLinesInWhitespace > 0 && (openParenthesisCount <= 1 && isComment(token)))
+ || (previousCompilableToken == TokenNameLBRACE && token == TokenNameRBRACE)
+ || (newLinesInWhitespace > 0 && previousCompilableToken == TokenNameDOT)
+ )
&& token != Scanner.TokenNameWHITESPACE) {
// Do not add newline & indent between an adjoining close brace and
// close paren. Anonymous inner classes may use this form.
}
break;
case TokenNameDOT:
+ space();
pendingSpace = false;
break;
case TokenNameSEMICOLON:
case TokenNameLPAREN:
case TokenNameNOT:
case TokenNameTWIDDLE:
- case TokenNameDOT:
case 0:
// no token
case TokenNameWHITESPACE: