private static boolean isInRecordHeader(@NotNull PsiElement element) {
      PsiElement parent = element.getParent();
      if (!(parent instanceof PsiJavaCodeReferenceElement)) {
        return false;
      }
      PsiElement grandParent = parent.getParent();
      if (!(grandParent instanceof PsiTypeElement)) {
        return false;
      }
      PsiElement greatGrandParent = grandParent.getParent();
      return greatGrandParent instanceof PsiRecordHeader || greatGrandParent instanceof PsiRecordComponent;
    }
private static boolean isInRecordHeader(@NotNull PsiElement element)