RecordNavigationInfo (PsiRecordComponent recordComponent) { return ReadAction.compute(() -> { String name = recordComponent.getName(); PsiClass containingClass = recordComponent.getContainingClass(); if (containingClass == null) return null; List<PsiMethod> methods = ContainerUtil.filter(containingClass.findMethodsByName(name, false), m -> m.getParameterList().isEmpty()); if (methods.size() != 1) return null; PsiField field = containingClass.findFieldByName(name, false); if (field == null) return null; PsiMethod compactConstructor = ContainerUtil.find(containingClass.getConstructors(), JavaPsiRecordUtil::isCompactConstructor); PsiParameter parameter = compactConstructor != null ? ContainerUtil.find(compactConstructor.getParameterList().getParameters(), p -> name.equals(p.getName())) : null; return new RecordNavigationInfo(methods.get(0), field, parameter, name); }); }