@Override
  public ResolveResult @NotNull [] multiResolve(boolean incompleteCode) {
    final String name = getName();
    if (name == null) return ResolveResult.EMPTY_ARRAY;
    ArrayList<GroovyResolveResult> candidates = new ArrayList<>();

    final PsiElement owner = GrDocCommentUtil.findDocOwner(this);
    if (owner instanceof GrMethod method && !name.startsWith("<")) {
      final GrParameter[] parameters = method.getParameters();

      for (GrParameter parameter : parameters) {
        if (name.equals(parameter.getName())) {
          candidates.add(new ElementResolveResult<>(parameter));
        }
      }
      return candidates.toArray(ResolveResult.EMPTY_ARRAY);
    }
    String typeParameterName = name.length() >= 3 && name.startsWith("<") && name.endsWith(">") ? name.substring(1, name.length() - 1) : name;
    final PsiElement firstChild = getFirstChild();
    if (owner instanceof GrTypeParameterListOwner && firstChild != null) {
      final ASTNode node = firstChild.getNode();
      if (node != null) {
        final PsiTypeParameter[] typeParameters = ((PsiTypeParameterListOwner)owner).getTypeParameters();
        for (PsiTypeParameter typeParameter : typeParameters) {
          if (typeParameterName.equals(typeParameter.getName())) {
            candidates.add(new ElementResolveResult<>(typeParameter));
          }
        }
      }
    }
    return candidates.toArray(ResolveResult.EMPTY_ARRAY);
  }
@Override
  public ResolveResult @NotNull [] multiResolve(boolean incompleteCode)