use of com.intellij.execution.ui.ConsoleViewContentType in project intellij-community by JetBrains.
the class ProjectLevelVcsManagerImpl method getOrCreateConsoleContent.
private Content getOrCreateConsoleContent(final ContentManager contentManager) {
final String displayName = VcsBundle.message("vcs.console.toolwindow.display.name");
Content content = contentManager.findContent(displayName);
if (content == null) {
releaseConsole();
myConsole = TextConsoleBuilderFactory.getInstance().createBuilder(myProject).getConsole();
JPanel panel = new JPanel(new BorderLayout());
panel.add(myConsole.getComponent(), BorderLayout.CENTER);
ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, new DefaultActionGroup(myConsole.createConsoleActions()), false);
panel.add(toolbar.getComponent(), BorderLayout.WEST);
content = ContentFactory.SERVICE.getInstance().createContent(panel, displayName, true);
content.setDisposer(myConsoleDisposer);
contentManager.addContent(content);
for (Pair<String, ConsoleViewContentType> pair : myPendingOutput) {
printToConsole(pair.first, pair.second);
}
myPendingOutput.clear();
}
return content;
}
use of com.intellij.execution.ui.ConsoleViewContentType in project intellij-community by JetBrains.
the class MavenConsoleImpl method doPrint.
protected void doPrint(String text, OutputType type) {
ensureAttachedToToolWindow();
ConsoleViewContentType contentType;
switch(type) {
case SYSTEM:
contentType = ConsoleViewContentType.SYSTEM_OUTPUT;
break;
case ERROR:
contentType = ConsoleViewContentType.ERROR_OUTPUT;
break;
case NORMAL:
default:
contentType = ConsoleViewContentType.NORMAL_OUTPUT;
}
myConsoleView.print(text, contentType);
}
use of com.intellij.execution.ui.ConsoleViewContentType in project intellij-plugins by JetBrains.
the class JstdServerConsoleTab method attachToServer.
public void attachToServer(@NotNull JstdServer server) {
myStatusView.attachToServer(server);
myConsoleView.clear();
server.addOutputListener(new JstdServerOutputListener() {
@Override
public void onOutputAvailable(@NotNull String text, @NotNull Key outputType) {
ConsoleViewContentType contentType = ConsoleViewContentType.getConsoleViewType(outputType);
myConsoleView.print(text, contentType);
}
@Override
public void onEvent(@NotNull JsonObject obj) {
}
});
}
Aggregations