mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
optimization: do not create ShowIntentionPass for canceled indicator
GitOrigin-RevId: be496653a993faed8250f0e7d17e4c340885ec46
This commit is contained in:
committed by
intellij-monorepo-bot
parent
5ec653e9f6
commit
b238ba6e1e
+2
@@ -13,6 +13,7 @@ import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.extensions.ExtensionPointListener;
|
||||
import com.intellij.openapi.extensions.ExtensionPointName;
|
||||
import com.intellij.openapi.extensions.PluginDescriptor;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
import com.intellij.openapi.project.DumbService;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.psi.PsiCompiledElement;
|
||||
@@ -177,6 +178,7 @@ public final class TextEditorHighlightingPassRegistrarImpl extends TextEditorHig
|
||||
IntList passesRefusedToCreate = new IntArrayList();
|
||||
try (AccessToken ignored = ClientId.withExplicitClientId(ClientEditorManager.Companion.getClientId(editor))) {
|
||||
for (int passId = 1; passId < frozenPassConfigs.length; passId++) {
|
||||
ProgressManager.checkCanceled();
|
||||
PassConfig passConfig = frozenPassConfigs[passId];
|
||||
if (passConfig == null) continue;
|
||||
if (ArrayUtil.find(passesToIgnore, passId) != -1) {
|
||||
|
||||
@@ -265,6 +265,7 @@ final class PassExecutorService implements Disposable {
|
||||
@NotNull List<ScheduledPass> dependentPasses,
|
||||
@NotNull DaemonProgressIndicator updateProgress,
|
||||
@NotNull AtomicInteger threadsToStartCountdown) {
|
||||
ProgressManager.checkCanceled();
|
||||
int passId = pass.getId();
|
||||
ScheduledPass scheduledPass = toBeSubmitted.get(passId);
|
||||
if (scheduledPass != null) return scheduledPass;
|
||||
@@ -295,6 +296,7 @@ final class PassExecutorService implements Disposable {
|
||||
}
|
||||
|
||||
if (pass.isRunIntentionPassAfter() && fileEditor instanceof TextEditor text) {
|
||||
ProgressManager.checkCanceled();
|
||||
Editor editor = text.getEditor();
|
||||
ShowIntentionsPass ip = new ShowIntentionsPass(psiFile, editor, false);
|
||||
assignUniqueId(ip, id2Pass);
|
||||
|
||||
Reference in New Issue
Block a user