Minor: drop usage of deprecated method

This commit is contained in:
Nikolay Krasko
2015-08-27 20:07:04 +03:00
parent f7a178f978
commit f2145fb9a5
@@ -33,6 +33,9 @@ import org.jetbrains.kotlin.asJava.KotlinLightMethod;
import org.jetbrains.kotlin.asJava.LightClassUtil; import org.jetbrains.kotlin.asJava.LightClassUtil;
import org.jetbrains.kotlin.psi.*; import org.jetbrains.kotlin.psi.*;
import java.util.ArrayList;
import java.util.List;
public class KotlinDefinitionsSearcher implements QueryExecutor<PsiElement, DefinitionsScopedSearch.SearchParameters> { public class KotlinDefinitionsSearcher implements QueryExecutor<PsiElement, DefinitionsScopedSearch.SearchParameters> {
@Override @Override
public boolean execute(@NotNull DefinitionsScopedSearch.SearchParameters queryParameters, @NotNull Processor<PsiElement> consumer) { public boolean execute(@NotNull DefinitionsScopedSearch.SearchParameters queryParameters, @NotNull Processor<PsiElement> consumer) {
@@ -83,8 +86,9 @@ public class KotlinDefinitionsSearcher implements QueryExecutor<PsiElement, Defi
}); });
if (psiMethod != null) { if (psiMethod != null) {
ContainerUtil.process(MethodImplementationsSearch.getMethodImplementations(psiMethod, scope), consumer); MethodImplementationsSearch.processImplementations(psiMethod, consumer, scope);
} }
return true; return true;
} }
@@ -114,7 +118,9 @@ public class KotlinDefinitionsSearcher implements QueryExecutor<PsiElement, Defi
public static boolean processPropertyImplementationsMethods(LightClassUtil.PropertyAccessorsPsiMethods accessors, @NotNull SearchScope scope, @NotNull Processor<PsiElement> consumer) { public static boolean processPropertyImplementationsMethods(LightClassUtil.PropertyAccessorsPsiMethods accessors, @NotNull SearchScope scope, @NotNull Processor<PsiElement> consumer) {
for (PsiMethod method : accessors) { for (PsiMethod method : accessors) {
PsiMethod[] implementations = MethodImplementationsSearch.getMethodImplementations(method, scope); List<PsiMethod> implementations = new ArrayList<PsiMethod>();
MethodImplementationsSearch.getOverridingMethods(method, implementations, scope);
for (PsiMethod implementation : implementations) { for (PsiMethod implementation : implementations) {
PsiElement mirrorElement = implementation instanceof KotlinLightMethod PsiElement mirrorElement = implementation instanceof KotlinLightMethod
? ((KotlinLightMethod) implementation).getOrigin() : null; ? ((KotlinLightMethod) implementation).getOrigin() : null;