Search in sources :

Example 11 with ConsoleViewContentType

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;
}
Also used : Content(com.intellij.ui.content.Content) ActionToolbar(com.intellij.openapi.actionSystem.ActionToolbar) DefaultActionGroup(com.intellij.openapi.actionSystem.DefaultActionGroup) ConsoleViewContentType(com.intellij.execution.ui.ConsoleViewContentType)

Example 12 with ConsoleViewContentType

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);
}
Also used : ConsoleViewContentType(com.intellij.execution.ui.ConsoleViewContentType)

Example 13 with ConsoleViewContentType

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) {
        }
    });
}
Also used : JstdServerOutputListener(com.google.jstestdriver.idea.server.JstdServerOutputListener) JsonObject(com.google.gson.JsonObject) Key(com.intellij.openapi.util.Key) ConsoleViewContentType(com.intellij.execution.ui.ConsoleViewContentType)

Aggregations

ConsoleViewContentType (com.intellij.execution.ui.ConsoleViewContentType)13 Key (com.intellij.openapi.util.Key)5 AnsiEscapeDecoder (com.intellij.execution.process.AnsiEscapeDecoder)2 ConsoleView (com.intellij.execution.ui.ConsoleView)2 IElementType (com.intellij.psi.tree.IElementType)2 Content (com.intellij.ui.content.Content)2 JsonObject (com.google.gson.JsonObject)1 JstdServerOutputListener (com.google.jstestdriver.idea.server.JstdServerOutputListener)1 HyperlinkInfo (com.intellij.execution.filters.HyperlinkInfo)1 Printable (com.intellij.execution.testframework.Printable)1 Printer (com.intellij.execution.testframework.Printer)1 ArchivedOutputListener (com.intellij.javascript.karma.util.ArchivedOutputListener)1 FlexUnitRunnerParameters (com.intellij.lang.javascript.flex.flexunit.FlexUnitRunnerParameters)1 Lexer (com.intellij.lexer.Lexer)1 Disposable (com.intellij.openapi.Disposable)1 ActionToolbar (com.intellij.openapi.actionSystem.ActionToolbar)1 DefaultActionGroup (com.intellij.openapi.actionSystem.DefaultActionGroup)1 RelativePoint (com.intellij.ui.awt.RelativePoint)1 StringTokenizer (com.intellij.util.text.StringTokenizer)1 THashSet (gnu.trove.THashSet)1