Search in sources :

Example 11 with PreElement

use of com.google.gwt.dom.client.PreElement in project che by eclipse.

the class GitOutputPartViewImpl method print.

@Override
public void print(String text, String color) {
    PreElement pre = DOM.createElement("pre").cast();
    pre.setInnerText(text.isEmpty() ? " " : text);
    try {
        pre.getStyle().setColor(SimpleHtmlSanitizer.sanitizeHtml(color).asString());
    } catch (Exception e) {
        Log.error(getClass(), "Unable to set color [" + color + "]", e);
    }
    consoleLines.getElement().appendChild(pre);
}
Also used : PreElement(com.google.gwt.dom.client.PreElement)

Aggregations

PreElement (com.google.gwt.dom.client.PreElement)11 VirtualConsole (org.rstudio.core.client.VirtualConsole)6 Node (com.google.gwt.dom.client.Node)1 SpanElement (com.google.gwt.dom.client.SpanElement)1 MatchResult (com.google.gwt.regexp.shared.MatchResult)1 RegExp (com.google.gwt.regexp.shared.RegExp)1 SafeHtml (com.google.gwt.safehtml.shared.SafeHtml)1