mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
another case of IDEA-149939 CCE in com.intellij.execution.stacktrace.StackTraceLine.getMethodLocation causes frozen UI
This commit is contained in:
@@ -103,15 +103,16 @@ public class StackTraceLine {
|
||||
final int dollarIndex = className.indexOf('$');
|
||||
if (dollarIndex != -1) className = className.substring(0, dollarIndex);
|
||||
PsiClass psiClass = findClass(project, className, lineNumber);
|
||||
if (psiClass == null || (psiClass.getNavigationElement() instanceof PsiCompiledElement)) return null;
|
||||
psiClass = (PsiClass)psiClass.getNavigationElement();
|
||||
final PsiMethod psiMethod = getMethodAtLine(psiClass, methodName, lineNumber);
|
||||
if (psiMethod != null) {
|
||||
return new MethodLineLocation(project, psiMethod, PsiLocation.fromPsiElement(psiClass), lineNumber);
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
PsiElement navElement = psiClass == null ? null : psiClass.getNavigationElement();
|
||||
if (psiClass == null || navElement instanceof PsiCompiledElement) return null;
|
||||
|
||||
if (navElement instanceof PsiClass) {
|
||||
final PsiMethod psiMethod = getMethodAtLine((PsiClass)navElement, methodName, lineNumber);
|
||||
if (psiMethod != null) {
|
||||
return new MethodLineLocation(project, psiMethod, PsiLocation.fromPsiElement((PsiClass)navElement), lineNumber);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static PsiClass findClass(final Project project, final String className, final int lineNumber) {
|
||||
|
||||
Reference in New Issue
Block a user