mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
a registry key to turn off PsiClassImplUtil.correctType
This commit is contained in:
@@ -20,6 +20,7 @@ import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.progress.ProgressIndicatorProvider;
|
||||
import com.intellij.openapi.roots.FileIndexFacade;
|
||||
import com.intellij.openapi.util.*;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.pom.java.LanguageLevel;
|
||||
import com.intellij.psi.*;
|
||||
@@ -711,6 +712,10 @@ public class PsiClassImplUtil {
|
||||
|
||||
@Nullable
|
||||
public static PsiClassType correctType(PsiClassType originalType, final GlobalSearchScope resolveScope) {
|
||||
if (!Registry.is("java.correct.class.type.by.place.resolve.scope")) {
|
||||
return originalType;
|
||||
}
|
||||
|
||||
final PsiClassType.ClassResolveResult originalResolveResult = originalType.resolveGenerics();
|
||||
PsiClass superClass = originalResolveResult.getElement();
|
||||
if (superClass == null) {
|
||||
@@ -746,7 +751,7 @@ public class PsiClassImplUtil {
|
||||
}
|
||||
});
|
||||
if (substitute == null) return null;
|
||||
|
||||
|
||||
substitutor = substitutor.put(typeParameters[i], substitute);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -257,6 +257,9 @@ java.annotations.inference.nullable.method.description=Restart is required; infe
|
||||
java.annotations.inference.nullable.method.transitivity=true
|
||||
java.annotations.inference.nullable.method.transitivity.description=Restart is required; if a method result is a call to a @Nullable method, reports the caller as @Nullable as well
|
||||
|
||||
java.correct.class.type.by.place.resolve.scope=true
|
||||
java.correct.class.type.by.place.resolve.scope.description=When resolving Java references, use the resolve scope of the currently processed source file
|
||||
|
||||
documentation.component.editor.font=false
|
||||
|
||||
ide.completion.show.better.matching.classes=true
|
||||
|
||||
Reference in New Issue
Block a user