if (document == null) {
document = new Document(text);
viewer.setDocument(document);
+ } else {
+ document.replace(document.getLength(), 0, text);
}
- document.replace(document.getLength(), 0, text);
} catch (BadLocationException e) {
}
// viewer.setDocument(document);