Navigatable (@NotNull XStackFrame frame, boolean isMainSourceKindPreferred) { XSourcePosition position = getFrameSourcePosition(frame, isMainSourceKindPreferred); Navigatable navigatable = position != null ? position.createNavigatable(session.getProject()) : null; return new NavigatableAdapter() { @Override public void navigate(boolean requestFocus) { if (navigatable != null && navigatable.canNavigate()) navigatable.navigate(requestFocus); handleFrameSelection(); } }; }