[run-targets][console, threading] IJPL-172039 Proper modality state for alarm in console in SshTargetIntrospectionStep

(cherry picked from commit dadc696c5c7268238c4b478fcedeeb757dd05e87)

IJ-CR-179253

GitOrigin-RevId: 47f999e3d51ec09472c400219eb57171eb73fa6d
This commit is contained in:
Vladimir Lagunov
2025-10-21 18:35:07 +00:00
committed by intellij-monorepo-bot
parent 2c31a44235
commit fa2e54203a
2 changed files with 5 additions and 3 deletions
@@ -1,4 +1,4 @@
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.execution.filters;
import com.intellij.execution.impl.ConsoleViewImpl;
@@ -45,7 +45,7 @@ public class TextConsoleBuilderImpl extends TextConsoleBuilder {
protected @NotNull ConsoleView createConsole() {
var result = new ConsoleViewImpl(myProject, myScope, myViewer, myUsePredefinedMessageFilter);
result.setUseOwnModalityForUpdates$intellij_platform_lang_impl(useOwnModalityStateForUpdates);
result.setUseOwnModalityForUpdates(useOwnModalityStateForUpdates);
return result;
}
@@ -85,6 +85,7 @@ import com.intellij.util.containers.ContainerUtil
import com.intellij.util.text.CharArrayUtil
import com.intellij.util.ui.EDT
import com.intellij.util.ui.UIUtil
import org.jetbrains.annotations.ApiStatus
import org.jetbrains.annotations.NonNls
import org.jetbrains.annotations.TestOnly
import org.jetbrains.annotations.VisibleForTesting
@@ -576,7 +577,8 @@ open class ConsoleViewImpl protected constructor(
}
}
internal var useOwnModalityForUpdates: Boolean = false
@ApiStatus.Internal
var useOwnModalityForUpdates: Boolean = false
protected open val stateForUpdate: ModalityState?
get() = if (useOwnModalityForUpdates) ModalityState.stateForComponent(this) else null