}
}
// 4 - add the content prefix (@see JavaDocRegion#postprocessCodeSnippet)
this.codeSnippetBuffer.setLength(0);
ILineTracker tracker = new DefaultLineTracker();
this.column = 1;
printIndentationIfNecessary(this.codeSnippetBuffer); // append indentation
this.codeSnippetBuffer.append(BLOCK_LINE_PREFIX);
String linePrefix = this.codeSnippetBuffer.toString();
this.codeSnippetBuffer.setLength(0);
String replacement = formattedSnippet;
tracker.set(formattedSnippet);
int numberOfLines = tracker.getNumberOfLines();
if (numberOfLines > 1) {
int lastLineOffset = -1;
for (int i=0; i<numberOfLines-1; i++) {
if (i>0) this.codeSnippetBuffer.append(linePrefix);
try {
lastLineOffset = tracker.getLineOffset(i+1);
this.codeSnippetBuffer.append(formattedSnippet.substring(tracker.getLineOffset(i), lastLineOffset));
} catch (BadLocationException e) {
// should not happen
CommentFormatterUtil.log(e);
return;
}