mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
@@ -39,11 +39,11 @@ public class MethodSuperSearcher implements QueryExecutor<MethodSignatureBackedB
|
||||
}
|
||||
|
||||
private static boolean addSuperMethods(final HierarchicalMethodSignature signature,
|
||||
final PsiMethod method,
|
||||
final PsiClass parentClass,
|
||||
final boolean allowStaticMethod,
|
||||
final boolean checkBases,
|
||||
final Processor<MethodSignatureBackedByPsiMethod> consumer) {
|
||||
final PsiMethod method,
|
||||
final PsiClass parentClass,
|
||||
final boolean allowStaticMethod,
|
||||
final boolean checkBases,
|
||||
final Processor<MethodSignatureBackedByPsiMethod> consumer) {
|
||||
PsiMethod signatureMethod = signature.getMethod();
|
||||
PsiClass hisClass = signatureMethod.getContainingClass();
|
||||
if (parentClass == null || InheritanceUtil.isInheritorOrSelf(parentClass, hisClass, true)) {
|
||||
|
||||
@@ -323,7 +323,7 @@ public class MethodSignatureUtil {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static PsiMethod[] convertMethodSignaturesToMethods(List<MethodSignatureBackedByPsiMethod> sameNameMethodList) {
|
||||
public static PsiMethod[] convertMethodSignaturesToMethods(List<? extends MethodSignatureBackedByPsiMethod> sameNameMethodList) {
|
||||
final PsiMethod[] methods = new PsiMethod[sameNameMethodList.size()];
|
||||
for (int i = 0; i < sameNameMethodList.size(); i++) {
|
||||
methods[i] = sameNameMethodList.get(i).getMethod();
|
||||
|
||||
@@ -18,6 +18,7 @@ package com.intellij.psi.util;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.util.containers.HashSet;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@@ -67,7 +68,7 @@ public class PsiSuperMethodUtil {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static boolean isSuperMethod(PsiMethod method, PsiMethod superMethod) {
|
||||
public static boolean isSuperMethod(@NotNull PsiMethod method, @NotNull PsiMethod superMethod) {
|
||||
HierarchicalMethodSignature signature = method.getHierarchicalMethodSignature();
|
||||
for (HierarchicalMethodSignature supsig : signature.getSuperSignatures()) {
|
||||
PsiMethod supsigme = supsig.getMethod();
|
||||
|
||||
@@ -897,8 +897,8 @@ public class TypeConversionUtil {
|
||||
*/
|
||||
@NotNull
|
||||
public static PsiSubstitutor getSuperClassSubstitutor(@NotNull PsiClass superClass,
|
||||
PsiClass derivedClass,
|
||||
PsiSubstitutor derivedSubstitutor) {
|
||||
@NotNull PsiClass derivedClass,
|
||||
@NotNull PsiSubstitutor derivedSubstitutor) {
|
||||
// [dsl] assertion commented out since we no longer cache isInheritor
|
||||
//LOG.assertTrue(derivedClass.isInheritor(superClass, true), "Not inheritor: " + derivedClass + " super: " + superClass);
|
||||
|
||||
@@ -928,8 +928,8 @@ public class TypeConversionUtil {
|
||||
}
|
||||
if (substitutor == null) {
|
||||
LOG.error(
|
||||
"Not inheritor: " + derivedClass + "(" + derivedClass.getClass().getName() + "; " + PsiUtil.getVirtualFile(derivedClass) + ");" +
|
||||
"\n super: " + superClass + "(" + superClass.getClass().getName() + "; " + PsiUtil.getVirtualFile(superClass) + ")");
|
||||
"Not inheritor: " + derivedClass + "(" + derivedClass.getClass().getName() + "; " + PsiUtilBase.getVirtualFile(derivedClass) + ");" +
|
||||
"\n super: " + superClass + "(" + superClass.getClass().getName() + "; " + PsiUtilBase.getVirtualFile(superClass) + ")");
|
||||
}
|
||||
return substitutor;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,8 @@ public class LowLevelSearchUtil {
|
||||
final PsiElement scope,
|
||||
final StringSearcher searcher,
|
||||
final int offset,
|
||||
final boolean ignoreInjectedPsi, ProgressIndicator progress) {
|
||||
final boolean ignoreInjectedPsi,
|
||||
ProgressIndicator progress) {
|
||||
final int scopeStartOffset = scope.getTextRange().getStartOffset();
|
||||
final int patternLength = searcher.getPatternLength();
|
||||
PsiElement leafElement = null;
|
||||
|
||||
Reference in New Issue
Block a user