Search in sources :

Example 1 with JstdServerOutputListener

use of com.google.jstestdriver.idea.server.JstdServerOutputListener 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

JsonObject (com.google.gson.JsonObject)1 JstdServerOutputListener (com.google.jstestdriver.idea.server.JstdServerOutputListener)1 ConsoleViewContentType (com.intellij.execution.ui.ConsoleViewContentType)1 Key (com.intellij.openapi.util.Key)1