use of com.intellij.execution.ui.ConsoleView in project intellij-plugins by JetBrains.
the class OutgoingCodePointerLocalMessage method createConsoleMessage.
public ConsoleMessage createConsoleMessage(User user) {
return new OwnConsoleMessage(user, StringUtil.getMsg("code.pointer"), getWhen()) {
public void printMessage(Project project, ConsoleView console) {
final IDEAFacade ideFacade = (IDEAFacade) Pico.getInstance().getComponentInstanceOfType(IDEFacade.class);
IncomingCodePointerMessage printer = new IncomingCodePointerMessage(myEvent, ideFacade);
printer.outputMessage(console);
}
};
}
use of com.intellij.execution.ui.ConsoleView in project intellij-plugins by JetBrains.
the class DartPubActionBase method showPubOutputConsole.
private static void showPubOutputConsole(@NotNull final Module module, @NotNull final GeneralCommandLine command, @NotNull final OSProcessHandler processHandler, @NotNull final VirtualFile pubspecYamlFile, @NotNull final String actionTitle) {
final ConsoleView console;
PubToolWindowContentInfo info = findExistingInfoForCommand(module.getProject(), command);
if (info != null) {
// rerunning the same pub command in the same tool window tab (corresponding tool window action invoked)
console = info.console;
console.clear();
} else {
console = createConsole(module.getProject(), pubspecYamlFile);
info = new PubToolWindowContentInfo(module, pubspecYamlFile, command, actionTitle, console);
final ActionToolbar actionToolbar = createToolWindowActionsBar(info);
final SimpleToolWindowPanel toolWindowPanel = new SimpleToolWindowPanel(false, true);
toolWindowPanel.setContent(console.getComponent());
toolWindowPanel.setToolbar(actionToolbar.getComponent());
final Content content = ContentFactory.SERVICE.getInstance().createContent(toolWindowPanel.getComponent(), actionTitle, true);
content.putUserData(PUB_TOOL_WINDOW_CONTENT_INFO_KEY, info);
Disposer.register(content, console);
final ContentManager contentManager = MessageView.SERVICE.getInstance(module.getProject()).getContentManager();
removeOldTabs(contentManager);
contentManager.addContent(content);
contentManager.setSelectedContent(content);
final ToolWindow toolWindow = ToolWindowManager.getInstance(module.getProject()).getToolWindow(ToolWindowId.MESSAGES_WINDOW);
toolWindow.activate(null, true);
}
info.rerunPubCommandAction.setProcessHandler(processHandler);
info.stopProcessAction.setProcessHandler(processHandler);
processHandler.addProcessListener(new ProcessAdapter() {
@Override
public void processTerminated(final ProcessEvent event) {
console.print(IdeBundle.message("finished.with.exit.code.text.message", event.getExitCode()), ConsoleViewContentType.SYSTEM_OUTPUT);
}
});
console.print(DartBundle.message("working.dir.0", FileUtil.toSystemDependentName(pubspecYamlFile.getParent().getPath())) + "\n", ConsoleViewContentType.SYSTEM_OUTPUT);
console.attachToProcess(processHandler);
processHandler.startNotify();
}
use of com.intellij.execution.ui.ConsoleView in project intellij-plugins by JetBrains.
the class DartTestRunningState method execute.
@Override
@NotNull
public ExecutionResult execute(@NotNull final Executor executor, @NotNull final ProgramRunner runner) throws ExecutionException {
final ProcessHandler processHandler = startProcess();
final ConsoleView consoleView = createConsole(getEnvironment());
consoleView.attachToProcess(processHandler);
final DefaultExecutionResult executionResult = new DefaultExecutionResult(consoleView, processHandler, createActions(consoleView, processHandler, executor));
if (ActionManager.getInstance().getAction("RerunFailedTests") != null) {
DartConsoleProperties properties = (DartConsoleProperties) ((SMTRunnerConsoleView) consoleView).getProperties();
AbstractRerunFailedTestsAction rerunFailedTestsAction = properties.createRerunFailedTestsAction(consoleView);
assert rerunFailedTestsAction != null;
rerunFailedTestsAction.setModelProvider(((SMTRunnerConsoleView) consoleView)::getResultsViewer);
executionResult.setRestartActions(rerunFailedTestsAction, new ToggleAutoTestAction());
} else {
executionResult.setRestartActions(new ToggleAutoTestAction());
}
return executionResult;
}
use of com.intellij.execution.ui.ConsoleView in project Intellij-Plugin by getgauge.
the class GaugeCommandLineState method execute.
@NotNull
@Override
public ExecutionResult execute(@NotNull Executor executor, @NotNull ProgramRunner runner) throws ExecutionException {
if (GaugeVersion.isGreaterOrEqual(GaugeRunConfiguration.TEST_RUNNER_SUPPORT_VERSION, false) && GaugeSettingsService.getSettings().useIntelliJTestRunner()) {
ProcessHandler handler = startProcess();
GaugeConsoleProperties properties = new GaugeConsoleProperties(config, "Gauge", executor, handler);
ConsoleView console = SMTestRunnerConnectionUtil.createAndAttachConsole("Gauge", handler, properties);
DefaultExecutionResult result = new DefaultExecutionResult(console, handler, createActions(console, handler));
if (ActionManager.getInstance().getAction("RerunFailedTests") != null) {
AbstractRerunFailedTestsAction action = properties.createRerunFailedTestsAction(console);
if (action != null) {
action.setModelProvider(((SMTRunnerConsoleView) console)::getResultsViewer);
result.setRestartActions(action);
}
}
return result;
}
return super.execute(executor, runner);
}
use of com.intellij.execution.ui.ConsoleView in project intellij-elixir by KronicDeth.
the class ElixirXDebugProcess method createConsole.
@NotNull
@Override
public ExecutionConsole createConsole() {
ConsoleView consoleView = myRunningState.createConsoleView(myExecutionEnvironment.getExecutor());
consoleView.attachToProcess(getProcessHandler());
myElixirProcessHandler.startNotify();
return consoleView;
}
Aggregations