private @Nullable String getDocForPattern(@NotNull PsiPatternVariable variable) {
    PsiPattern pattern = variable.getPattern();
    PsiElement parent = pattern.getParent();
    if (!(parent instanceof PsiDeconstructionList deconstructionList)) return null;
    PsiPattern[] components = deconstructionList.getDeconstructionComponents();
    int index = ArrayUtil.indexOf(components, pattern);
    PsiDeconstructionPattern deconstructionPattern = (PsiDeconstructionPattern)parent.getParent();
    PsiTypeElement typeElement = deconstructionPattern.getTypeElement();
    PsiType deconstructionType = typeElement.getType();
    PsiClass recordClass = PsiUtil.resolveClassInClassTypeOnly(deconstructionType);
    if (recordClass == null) return null;
    return getRecordComponentJavadocFromParameterTag(index, recordClass);
  }
private @Nullable String getDocForPattern(@NotNull PsiPatternVariable variable)