This commit is contained in:
Alexey Kudravtsev
2015-04-16 14:34:53 +03:00
parent 0b2e95a23d
commit 3d75cfde13
2 changed files with 5 additions and 3 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -212,6 +212,7 @@ public class TargetElementUtil extends TargetElementUtilBase {
return null;
}
@NotNull
@Override
public Collection<PsiElement> getTargetCandidates(final PsiReference reference) {
PsiElement parent = reference.getElement().getParent();
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -336,10 +336,11 @@ public class TargetElementUtilBase {
}
}
@NotNull
public Collection<PsiElement> getTargetCandidates(PsiReference reference) {
if (reference instanceof PsiPolyVariantReference) {
final ResolveResult[] results = ((PsiPolyVariantReference)reference).multiResolve(false);
final ArrayList<PsiElement> navigatableResults = new ArrayList<PsiElement>(results.length);
List<PsiElement> navigatableResults = new ArrayList<PsiElement>(results.length);
for(ResolveResult r:results) {
PsiElement element = r.getElement();