public void setText(final String text) {
    ApplicationManager.getApplication().runWriteAction(() -> CommandProcessor.getInstance().executeCommand(getProject(), () -> {
      myDocument.replaceString(0, myDocument.getTextLength(), text);
      if (myEditorField != null && myEditorField.getEditor() != null) {
        myEditorField.getCaretModel().moveToOffset(myDocument.getTextLength());
      }
    }, null, myDocument));
  }
public void setText(final String text)