return DomUtils.toXml(node);
}
public static void formatItem(UntypedItem o, Ansi ansi, boolean fullPath) {
UntypedItemXml item = (UntypedItemXml) o;
Ansi.Action action = null;
switch (item.getState()) {
case ACTIVE:
action = Ansi.TEXT_COLOR_GREEN;
break;
case BUILD_ERROR:
action = Ansi.TEXT_COLOR_RED;
break;
case DELETED:
action = Ansi.TEXT_COLOR_MAGENTA;
break;
default:
action = Ansi.TEXT_COLOR_BLUE;
break;
}
Ansi.Action undo = null;
if (action != null) {
undo = ansi.doAction(action);
}
try {
PlatformLayerKey plk = item.getKey();
if (fullPath) {
ansi.print(plk.getUrl());
} else {
ansi.print(plk.getItemId().getKey());