private static boolean executeNavigate(@NotNull Project project, ModNavigate nav, @Nullable Editor editor) {
    VirtualFile file = actualize(nav.file());
    if (file == null) return false;
    int selectionStart = nav.selectionStart();
    int selectionEnd = nav.selectionEnd();
    int caret = nav.caret();

    Editor fileEditor = getEditor(project, editor, file);

    if (fileEditor == null) return false;
    if (caret != -1) {
      fileEditor.getCaretModel().moveToOffset(caret);
      fileEditor.getScrollingModel().scrollToCaret(ScrollType.MAKE_VISIBLE);
    }
    if (selectionStart != -1 && selectionEnd != -1) {
      fileEditor.getSelectionModel().setSelection(selectionStart, selectionEnd);
    }
    return true;
  }
private static boolean executeNavigate(@NotNull Project project, ModNavigate nav, @Nullable Editor editor)