use of com.intellij.execution.ui.ConsoleView in project freeline by alibaba.
the class FreelineUtil method processConsole.
/* process attach to console,show the log */
// TODO: 2016/9/14 0014 need refactor console method
private static void processConsole(Project project, ProcessHandler processHandler) {
ConsoleView consoleView = FreeUIManager.getInstance(project).getConsoleView(project);
consoleView.clear();
consoleView.attachToProcess(processHandler);
ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project);
ToolWindow toolWindow;
toolWindow = toolWindowManager.getToolWindow(TOOL_ID);
// if already exist tool window then show it
if (toolWindow != null) {
toolWindow.show(null);
return;
}
toolWindow = toolWindowManager.registerToolWindow(TOOL_ID, true, ToolWindowAnchor.BOTTOM);
toolWindow.setTitle("free....");
toolWindow.setStripeTitle("Free Console");
toolWindow.setShowStripeButton(true);
toolWindow.setIcon(PluginIcons.ICON_TOOL_WINDOW);
toolWindow.getContentManager().addContent(new ContentImpl(consoleView.getComponent(), "Build", true));
toolWindow.show(null);
}
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;
}
use of com.intellij.execution.ui.ConsoleView in project intellij-elixir by KronicDeth.
the class MixExUnitRunningState method execute.
@NotNull
@Override
public ExecutionResult execute(@NotNull Executor executor, @NotNull ProgramRunner runner) throws ExecutionException {
ProcessHandler processHandler = startProcess();
TestConsoleProperties properties = new SMTRunnerConsoleProperties(myConfiguration, TEST_FRAMEWORK_NAME, executor);
ConsoleView console = createAndAttachConsole(TEST_FRAMEWORK_NAME, processHandler, properties);
ElixirConsoleUtil.attachFilters(myConfiguration.getProject(), console);
return new DefaultExecutionResult(console, processHandler, createActions(console, processHandler));
}
use of com.intellij.execution.ui.ConsoleView in project intellij-elixir by KronicDeth.
the class MixRunningState method execute.
@NotNull
@Override
public ExecutionResult execute(@NotNull Executor executor, @NotNull ProgramRunner runner) throws ExecutionException {
TextConsoleBuilder consoleBuilder = new TextConsoleBuilderImpl(myConfiguration.getProject()) {
@Override
public ConsoleView getConsole() {
ConsoleView consoleView = super.getConsole();
ElixirConsoleUtil.attachFilters(myConfiguration.getProject(), consoleView);
return consoleView;
}
};
setConsoleBuilder(consoleBuilder);
return super.execute(executor, runner);
}
use of com.intellij.execution.ui.ConsoleView in project intellij-community by JetBrains.
the class DebuggerUtilsEx method addThreadDump.
public static void addThreadDump(Project project, List<ThreadState> threads, final RunnerLayoutUi ui, DebuggerSession session) {
final TextConsoleBuilder consoleBuilder = TextConsoleBuilderFactory.getInstance().createBuilder(project);
consoleBuilder.filters(ExceptionFilters.getFilters(session.getSearchScope()));
final ConsoleView consoleView = consoleBuilder.getConsole();
final DefaultActionGroup toolbarActions = new DefaultActionGroup();
consoleView.allowHeavyFilters();
final ThreadDumpPanel panel = new ThreadDumpPanel(project, consoleView, toolbarActions, threads);
final String id = THREAD_DUMP_CONTENT_PREFIX + " #" + myCurrentThreadDumpId;
final Content content = ui.createContent(id, panel, id, null, null);
content.putUserData(RunnerContentUi.LIGHTWEIGHT_CONTENT_MARKER, Boolean.TRUE);
content.setCloseable(true);
content.setDescription("Thread Dump");
ui.addContent(content);
ui.selectAndFocus(content, true, true);
myThreadDumpsCount++;
myCurrentThreadDumpId++;
Disposer.register(content, new Disposable() {
@Override
public void dispose() {
myThreadDumpsCount--;
if (myThreadDumpsCount == 0) {
myCurrentThreadDumpId = 1;
}
}
});
Disposer.register(content, consoleView);
ui.selectAndFocus(content, true, false);
if (threads.size() > 0) {
panel.selectStackFrame(0);
}
}
Aggregations