void () { Coordinates coordinates = getCoordinates(); if (coordinates == null) return; LogicalPosition position = new LogicalPosition(coordinates.row(), coordinates.column()); myEditor.getCaretModel().removeSecondaryCarets(); myEditor.getCaretModel().moveToLogicalPosition(position); myEditor.getScrollingModel().scrollToCaret(ScrollType.CENTER); myEditor.getSelectionModel().removeSelection(); IdeFocusManager.getGlobalInstance().requestFocus(myEditor.getContentComponent(), true); super.doOKAction(); }