ResolveResult[] () { String name = getReferenceName(); GrDocReferenceElement holder = getReferenceHolder(); PsiElement resolved; if (holder != null) { GrCodeReferenceElement referenceElement = holder.getReferenceElement(); resolved = referenceElement != null ? referenceElement.resolve() : null; } else { resolved = PsiUtil.getContextClass(GrDocCommentUtil.findDocOwner(this)); } if (resolved instanceof PsiClass) { PropertyResolverProcessor processor = new PropertyResolverProcessor(name, this); resolved.processDeclarations(processor, ResolveState.initial(), resolved, this); GroovyResolveResult[] candidates = processor.getCandidates(); if (candidates.length == 0) { PsiType thisType = JavaPsiFacade.getInstance(getProject()).getElementFactory().createType((PsiClass) resolved, PsiSubstitutor.EMPTY); MethodResolverProcessor methodProcessor = new MethodResolverProcessor(name, this, false, thisType, null, PsiType.EMPTY_ARRAY); MethodResolverProcessor constructorProcessor = new MethodResolverProcessor(name, this, true, thisType, null, PsiType.EMPTY_ARRAY); resolved.processDeclarations(methodProcessor, ResolveState.initial(), resolved, this); resolved.processDeclarations(constructorProcessor, ResolveState.initial(), resolved, this); candidates = ArrayUtil.mergeArrays(methodProcessor.getCandidates(), constructorProcessor.getCandidates()); if (candidates.length > 0) { candidates = new GroovyResolveResult[]{candidates[0]}; } } return candidates; } return ResolveResult.EMPTY_ARRAY; }