Search in sources :

Example 11 with ExecutionConsole

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

the class PyDebugRunner method createConsoleCommunicationAndSetupActions.

public static void createConsoleCommunicationAndSetupActions(@NotNull final Project project, @NotNull final ExecutionResult result, @NotNull PyDebugProcess debugProcess, @NotNull XDebugSession session) {
    ExecutionConsole console = result.getExecutionConsole();
    if (console instanceof PythonDebugLanguageConsoleView) {
        ProcessHandler processHandler = result.getProcessHandler();
        initDebugConsoleView(project, debugProcess, (PythonDebugLanguageConsoleView) console, processHandler, session);
    }
}
Also used : PythonDebugLanguageConsoleView(com.jetbrains.python.console.PythonDebugLanguageConsoleView) ProcessHandler(com.intellij.execution.process.ProcessHandler) ExecutionConsole(com.intellij.execution.ui.ExecutionConsole)

Example 12 with ExecutionConsole

use of com.intellij.execution.ui.ExecutionConsole in project intellij-plugins by JetBrains.

the class KarmaConsoleView method get.

/**
   * @return null in case of "Import Test Result" action
   */
@Nullable
public static KarmaConsoleView get(@NotNull ExecutionResult result, @NotNull RunProfileState state) {
    ExecutionConsole console = result.getExecutionConsole();
    if (console instanceof KarmaConsoleView) {
        return (KarmaConsoleView) console;
    }
    Class consoleClass = console != null ? console.getClass() : null;
    LOG.info("Cannot cast " + consoleClass + " to " + KarmaConsoleView.class.getSimpleName() + ", RunProfileState: " + state.getClass().getName());
    return null;
}
Also used : ExecutionConsole(com.intellij.execution.ui.ExecutionConsole) Nullable(org.jetbrains.annotations.Nullable)

Example 13 with ExecutionConsole

use of com.intellij.execution.ui.ExecutionConsole in project intellij by bazelbuild.

the class SmRunnerUtils method attachRerunFailedTestsAction.

public static DefaultExecutionResult attachRerunFailedTestsAction(DefaultExecutionResult result) {
    ExecutionConsole console = result.getExecutionConsole();
    if (!(console instanceof SMTRunnerConsoleView)) {
        return result;
    }
    SMTRunnerConsoleView smConsole = (SMTRunnerConsoleView) console;
    TestConsoleProperties consoleProperties = smConsole.getProperties();
    if (!(consoleProperties instanceof BlazeTestConsoleProperties)) {
        return result;
    }
    BlazeTestConsoleProperties properties = (BlazeTestConsoleProperties) consoleProperties;
    AbstractRerunFailedTestsAction action = properties.createRerunFailedTestsAction(smConsole);
    if (action != null) {
        action.init(properties);
        action.setModelProvider(smConsole::getResultsViewer);
        result.setRestartActions(action);
    }
    return result;
}
Also used : SMTRunnerConsoleView(com.intellij.execution.testframework.sm.runner.ui.SMTRunnerConsoleView) AbstractRerunFailedTestsAction(com.intellij.execution.testframework.actions.AbstractRerunFailedTestsAction) ExecutionConsole(com.intellij.execution.ui.ExecutionConsole) TestConsoleProperties(com.intellij.execution.testframework.TestConsoleProperties)

Aggregations

ExecutionConsole (com.intellij.execution.ui.ExecutionConsole)13 NotNull (org.jetbrains.annotations.NotNull)6 ProcessHandler (com.intellij.execution.process.ProcessHandler)5 RunnerLayoutUi (com.intellij.execution.ui.RunnerLayoutUi)3 Content (com.intellij.ui.content.Content)3 ProcessEvent (com.intellij.execution.process.ProcessEvent)2 ProgramRunner (com.intellij.execution.runners.ProgramRunner)2 SMTRunnerConsoleView (com.intellij.execution.testframework.sm.runner.ui.SMTRunnerConsoleView)2 RunContentDescriptor (com.intellij.execution.ui.RunContentDescriptor)2 FlexUnitRunnerParameters (com.intellij.lang.javascript.flex.flexunit.FlexUnitRunnerParameters)2 VirtualFile (com.intellij.openapi.vfs.VirtualFile)2 XDebugTabLayouter (com.intellij.xdebugger.ui.XDebugTabLayouter)2 PythonDebugLanguageConsoleView (com.jetbrains.python.console.PythonDebugLanguageConsoleView)2 File (java.io.File)2 IOException (java.io.IOException)2 Nullable (org.jetbrains.annotations.Nullable)2 CodeInsightTestCase (com.intellij.codeInsight.CodeInsightTestCase)1 InstancesTracker (com.intellij.debugger.memory.component.InstancesTracker)1 MemoryViewDebugProcessData (com.intellij.debugger.memory.component.MemoryViewDebugProcessData)1 ClassesFilteredView (com.intellij.debugger.memory.ui.ClassesFilteredView)1