data = data.substring(0, offset)
+ data.substring(offset + 1);
document.set(data);
MainAutoEditStrategy indentLineAutoEditStrategy = new MainAutoEditStrategy();
DocumentCommand cmd = new DocumentCommand() {
};
cmd.offset = offset;
cmd.length = 0;
if (pdttFile.getOther() != null) {
cmd.text = pdttFile.getOther().replaceAll("\r\n", "\n");
} else {
cmd.text = "\n";
}
cmd.doit = true;
cmd.shiftsCaret = true;
cmd.caretOffset = -1;
indentLineAutoEditStrategy
.customizeDocumentCommand(document,
cmd);
document.replace(cmd.offset, cmd.length,
cmd.text);