private static Document createNonUndoableDocument(String text) {
    Document document = EditorFactory.getInstance().createDocument(text);
    UndoUtil.disableUndoFor(document);
    return document;
  }
private static Document createNonUndoableDocument(String text)