int lineOffset = getCurrentLineStart(formatted, offset);
String destIndentString = (lineOffset == 0)
? this.formatter.createIndentString(initialIndentLevel)
: this.formatter.getIndentString(formatted.substring(lineOffset, offset));
if (data instanceof CopyPlaceholderData) { // replace with a copy/move target
CopySourceInfo copySource= ((CopyPlaceholderData) data).copySource;
int srcIndentLevel= getIndent(copySource.getNode().getStartPosition());
TextEdit sourceEdit= getCopySourceEdit(copySource);
doTextCopy(sourceEdit, insertOffset, srcIndentLevel, destIndentString, editGroup);
currPos= offset + curr.length; // continue to insert after the replaced string
if (needsNewLineForLineComment(copySource.getNode(), formatted, currPos)) {
doTextInsert(insertOffset, getLineDelimiter(), editGroup);
}
} else if (data instanceof StringPlaceholderData) { // replace with a placeholder
String code= ((StringPlaceholderData) data).code;
String str= this.formatter.changeIndent(code, 0, destIndentString);