mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
DfaAssist#computeHints: catch AbsentInformationException
GitOrigin-RevId: 557db9a449c6f5968b5f410e9e8c53d7e650378d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0a23d9f8e7
commit
62bdf2012a
@@ -118,13 +118,19 @@ public class DfaAssist implements DebuggerContextListener {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
static Map<PsiExpression, DfaHint> computeHints(StackFrame frame, PsiElement element) throws AbsentInformationException {
|
||||
static Map<PsiExpression, DfaHint> computeHints(StackFrame frame, PsiElement element) {
|
||||
Method method = frame.location().method();
|
||||
if (!element.isValid()) return Collections.emptyMap();
|
||||
|
||||
PsiMethod psiMethod = PsiTreeUtil.getParentOfType(element, PsiMethod.class);
|
||||
if (psiMethod == null || !psiMethod.getName().equals(method.name()) ||
|
||||
psiMethod.getParameterList().getParametersCount() != method.arguments().size()) {
|
||||
boolean methodMatches = false;
|
||||
try {
|
||||
methodMatches = psiMethod == null || !psiMethod.getName().equals(method.name()) ||
|
||||
psiMethod.getParameterList().getParametersCount() != method.arguments().size();
|
||||
}
|
||||
catch (AbsentInformationException ignored) {
|
||||
}
|
||||
if (!methodMatches) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
PsiStatement statement = getAnchorStatement(element);
|
||||
|
||||
Reference in New Issue
Block a user