Search in sources :

Example 41 with ConsoleView

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

the class CfmlUnitRunConfiguration method getState.

@Override
public RunProfileState getState(@NotNull Executor executor, @NotNull final ExecutionEnvironment env) throws ExecutionException {
    return new RunProfileState() {

        @Override
        public ExecutionResult execute(Executor executor, @NotNull ProgramRunner runner) throws ExecutionException {
            final ProcessHandler processHandler = new MyProcessHandler();
            final ConsoleView console = createConsole(getProject(), processHandler, env, executor);
            console.addMessageFilter(new CfmlStackTraceFilterProvider(getProject()));
            // processHandler.startNotify();
            runTests(processHandler);
            return new DefaultExecutionResult(console, processHandler);
        }
    };
}
Also used : Executor(com.intellij.execution.Executor) DefaultExecutionResult(com.intellij.execution.DefaultExecutionResult) BaseTestsOutputConsoleView(com.intellij.execution.testframework.ui.BaseTestsOutputConsoleView) ConsoleView(com.intellij.execution.ui.ConsoleView) ProcessHandler(com.intellij.execution.process.ProcessHandler) ProgramRunner(com.intellij.execution.runners.ProgramRunner) NotNull(org.jetbrains.annotations.NotNull)

Example 42 with ConsoleView

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

the class MessagesTabTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    myUserMock = mock(User.class);
    myUser = (User) myUserMock.proxy();
    final Mock consoleStub = mock(ConsoleView.class);
    consoleStub.stubs().method(ANYTHING);
    consoleStub.stubs().method("getComponent").will(returnValue(new JLabel()));
    LocalMessageDispatcherImpl localMessageDispatcher = new LocalMessageDispatcherImpl(getBroadcaster(), new MockIDEFacade(getClass()), null);
    disposeOnTearDown(localMessageDispatcher);
    myMessagesTab = new MessagesTab(null, myUser, localMessageDispatcher, true) {

        @Override
        protected ConsoleView createConsoleView(Project project) {
            return (ConsoleView) consoleStub.proxy();
        }
    };
    disposeOnTearDown(myMessagesTab);
}
Also used : Project(com.intellij.openapi.project.Project) User(jetbrains.communicator.core.users.User) ConsoleView(com.intellij.execution.ui.ConsoleView) MockIDEFacade(jetbrains.communicator.mock.MockIDEFacade) LocalMessageDispatcherImpl(jetbrains.communicator.core.impl.dispatcher.LocalMessageDispatcherImpl) Mock(org.jmock.Mock)

Aggregations

ConsoleView (com.intellij.execution.ui.ConsoleView)42 NotNull (org.jetbrains.annotations.NotNull)20 ProcessHandler (com.intellij.execution.process.ProcessHandler)15 DefaultExecutionResult (com.intellij.execution.DefaultExecutionResult)9 SMTRunnerConsoleView (com.intellij.execution.testframework.sm.runner.ui.SMTRunnerConsoleView)7 TextConsoleBuilder (com.intellij.execution.filters.TextConsoleBuilder)6 Content (com.intellij.ui.content.Content)6 ConsoleViewImpl (com.intellij.execution.impl.ConsoleViewImpl)5 ToolWindow (com.intellij.openapi.wm.ToolWindow)5 Executor (com.intellij.execution.Executor)4 TestConsoleProperties (com.intellij.execution.testframework.TestConsoleProperties)4 ToggleAutoTestAction (com.intellij.execution.testframework.autotest.ToggleAutoTestAction)4 RunContentDescriptor (com.intellij.execution.ui.RunContentDescriptor)4 Disposable (com.intellij.openapi.Disposable)4 DefaultRunExecutor (com.intellij.execution.executors.DefaultRunExecutor)3 BaseTestsOutputConsoleView (com.intellij.execution.testframework.ui.BaseTestsOutputConsoleView)3 CloseAction (com.intellij.execution.ui.actions.CloseAction)3 Project (com.intellij.openapi.project.Project)3 AndroidLogcatView (com.android.tools.idea.logcat.AndroidLogcatView)2 ExecutionException (com.intellij.execution.ExecutionException)2