@Override
public ChangeInfo implement() throws Exception {
String text = doc.getText(start, length);
final BaseDocument bdoc = (BaseDocument) doc;
bdoc.runAtomic(new Runnable() {
@Override
public void run() {
try {
bdoc.insertString(start, "[", null);
bdoc.remove(start+1, 6);
bdoc.remove(start+length-5, 1);
bdoc.insertString(start+length-5, "]", null);
} catch(BadLocationException ex) {
Exceptions.printStackTrace(ex);
}
}
});