Search in sources :

Example 1 with ObservableConsoleView

use of com.intellij.execution.ui.ObservableConsoleView in project intellij-community by JetBrains.

the class DebuggerSessionTabBase method attachNotificationTo.

protected void attachNotificationTo(final Content content) {
    if (myConsole instanceof ObservableConsoleView) {
        ObservableConsoleView observable = (ObservableConsoleView) myConsole;
        observable.addChangeListener(types -> {
            if (types.contains(ConsoleViewContentType.ERROR_OUTPUT) || types.contains(ConsoleViewContentType.NORMAL_OUTPUT)) {
                content.fireAlert();
            }
        }, content);
        RunProfile profile = getRunProfile();
        if (profile instanceof RunConfigurationBase && !ApplicationManager.getApplication().isUnitTestMode()) {
            observable.addChangeListener(new RunContentBuilder.ConsoleToFrontListener((RunConfigurationBase) profile, myProject, DefaultDebugExecutor.getDebugExecutorInstance(), myRunContentDescriptor, myUi), content);
        }
    }
}
Also used : RunConfigurationBase(com.intellij.execution.configurations.RunConfigurationBase) ObservableConsoleView(com.intellij.execution.ui.ObservableConsoleView) RunProfile(com.intellij.execution.configurations.RunProfile) RunContentBuilder(com.intellij.execution.runners.RunContentBuilder)

Aggregations

RunConfigurationBase (com.intellij.execution.configurations.RunConfigurationBase)1 RunProfile (com.intellij.execution.configurations.RunProfile)1 RunContentBuilder (com.intellij.execution.runners.RunContentBuilder)1 ObservableConsoleView (com.intellij.execution.ui.ObservableConsoleView)1