void (final Editor currentEditor) { ApplicationManager.getApplication().invokeLater( () -> { if (!currentEditor.isDisposed()) currentEditor.getCaretModel().moveToOffset(currentEditor.getDocument().getTextLength()); } ); }