Lines 1628-1633
Link Here
|
1628 |
boolean firstWord = true; |
1628 |
boolean firstWord = true; |
1629 |
boolean clearBlankLines = this.formatter.preferences.comment_clear_blank_lines_in_block_comment; |
1629 |
boolean clearBlankLines = this.formatter.preferences.comment_clear_blank_lines_in_block_comment; |
1630 |
boolean joinLines = this.formatter.preferences.join_lines_in_comments; |
1630 |
boolean joinLines = this.formatter.preferences.join_lines_in_comments; |
|
|
1631 |
boolean condensed = this.formatter.preferences.comment_condensed_block_comment; |
1631 |
int scannerLine = Util.getLineNumber(this.scanner.currentPosition, this.lineEnds, 0, this.maxLines); |
1632 |
int scannerLine = Util.getLineNumber(this.scanner.currentPosition, this.lineEnds, 0, this.maxLines); |
1632 |
int firstLine = scannerLine; |
1633 |
int firstLine = scannerLine; |
1633 |
int lineNumber = scannerLine; |
1634 |
int lineNumber = scannerLine; |
Lines 1687-1696
Link Here
|
1687 |
this.column += tokensBuffer.length(); |
1688 |
this.column += tokensBuffer.length(); |
1688 |
} |
1689 |
} |
1689 |
// end of comment |
1690 |
// end of comment |
1690 |
if (multiLines || hasMultiLines) { |
1691 |
if (!condensed) { |
1691 |
buffer.append(this.lineSeparator); |
1692 |
if (multiLines || hasMultiLines) { |
1692 |
this.column = 1; |
1693 |
buffer.append(this.lineSeparator); |
1693 |
printIndentationIfNecessary(buffer); |
1694 |
this.column = 1; |
|
|
1695 |
printIndentationIfNecessary(buffer); |
1696 |
} |
1694 |
} |
1697 |
} |
1695 |
buffer.append(' '); |
1698 |
buffer.append(' '); |
1696 |
this.column += BLOCK_FOOTER_LENGTH + 1; |
1699 |
this.column += BLOCK_FOOTER_LENGTH + 1; |
Lines 1736-1742
Link Here
|
1736 |
int max; |
1739 |
int max; |
1737 |
lineNumber = Util.getLineNumber(this.scanner.currentPosition, this.lineEnds, scannerLine>1 ? scannerLine-2 : 0, this.maxLines); |
1740 |
lineNumber = Util.getLineNumber(this.scanner.currentPosition, this.lineEnds, scannerLine>1 ? scannerLine-2 : 0, this.maxLines); |
1738 |
if (lastTextLine == -1) { |
1741 |
if (lastTextLine == -1) { |
1739 |
linesGap = lineNumber - firstLine; |
1742 |
linesGap = condensed ? 0 : lineNumber - firstLine; |
1740 |
max = 0; |
1743 |
max = 0; |
1741 |
} else { |
1744 |
} else { |
1742 |
linesGap = lineNumber - lastTextLine; |
1745 |
linesGap = lineNumber - lastTextLine; |
Lines 1874-1880
Link Here
|
1874 |
} |
1877 |
} |
1875 |
|
1878 |
|
1876 |
private void printBlockCommentHeaderLine(StringBuffer buffer) { |
1879 |
private void printBlockCommentHeaderLine(StringBuffer buffer) { |
1877 |
if (buffer.length() == 0) { |
1880 |
if (this.formatter.preferences.comment_condensed_block_comment) { |
|
|
1881 |
buffer.insert(0, ' '); |
1882 |
this.column++; |
1883 |
} |
1884 |
else if (buffer.length() == 0) { |
1878 |
buffer.append(this.lineSeparator); |
1885 |
buffer.append(this.lineSeparator); |
1879 |
this.column = 1; |
1886 |
this.column = 1; |
1880 |
printIndentationIfNecessary(buffer); |
1887 |
printIndentationIfNecessary(buffer); |
Lines 3276-3282
Link Here
|
3276 |
printJavadocBlock(previousBlock); |
3283 |
printJavadocBlock(previousBlock); |
3277 |
|
3284 |
|
3278 |
// format the header and footer empty spaces |
3285 |
// format the header and footer empty spaces |
3279 |
int newLines = this.line > currentLine || javadoc.isMultiLine() ? 1 : 0; |
3286 |
int newLines = (!this.formatter.preferences.comment_condensed_javadoc_comment && (this.line > currentLine || javadoc.isMultiLine())) ? 1 : 0; |
3280 |
printJavadocGapLines(javadoc.textStart, firstBlockStart-1, newLines, this.formatter.preferences.comment_clear_blank_lines_in_javadoc_comment, false, null); |
3287 |
printJavadocGapLines(javadoc.textStart, firstBlockStart-1, newLines, this.formatter.preferences.comment_clear_blank_lines_in_javadoc_comment, false, null); |
3281 |
printJavadocGapLines(previousBlock.sourceEnd+1, javadoc.textEnd, newLines, this.formatter.preferences.comment_clear_blank_lines_in_javadoc_comment, true, null); |
3288 |
printJavadocGapLines(previousBlock.sourceEnd+1, javadoc.textEnd, newLines, this.formatter.preferences.comment_clear_blank_lines_in_javadoc_comment, true, null); |
3282 |
} |
3289 |
} |