From 21b52d4e0c248fac6b191abc7b3806e24c0fa9f7 Mon Sep 17 00:00:00 2001 From: Egor Ushakov Date: Fri, 2 Feb 2024 18:10:06 +0100 Subject: [PATCH] EA-465329 - INRE: LineBreakpoint.findClassCandidatesInSourceContent - breakpoint GitOrigin-RevId: cab2016ed12e37d2aacd7cc291889e01c70dc7a3 --- .../com/intellij/debugger/ui/breakpoints/LineBreakpoint.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/LineBreakpoint.java b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/LineBreakpoint.java index d5cd20926ba5..f33602df1a89 100644 --- a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/LineBreakpoint.java +++ b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/LineBreakpoint.java @@ -1,4 +1,4 @@ -// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. /* * Class LineBreakpoint @@ -20,6 +20,7 @@ import com.intellij.openapi.application.ReadAction; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.editor.Document; import com.intellij.openapi.module.Module; +import com.intellij.openapi.project.DumbService; import com.intellij.openapi.project.Project; import com.intellij.openapi.roots.ProjectFileIndex; import com.intellij.openapi.roots.ProjectRootManager; @@ -281,7 +282,7 @@ public class LineBreakpoint

extends Breakpoi private Collection findClassCandidatesInSourceContent(final String className, final GlobalSearchScope scope, final ProjectFileIndex fileIndex) { final int dollarIndex = className.indexOf("$"); final String topLevelClassName = dollarIndex >= 0 ? className.substring(0, dollarIndex) : className; - return ReadAction.compute(() -> { + return DumbService.getInstance(myProject).runReadActionInSmartMode(() -> { final PsiClass[] classes = JavaPsiFacade.getInstance(myProject).findClasses(topLevelClassName, scope); if (LOG.isDebugEnabled()) { LOG.debug("Found " + classes.length + " classes " + topLevelClassName + " in scope " + scope);