}
StringBuilder buf = new StringBuilder();
Iterator<? extends CqlPart> partIt = currentCompletion.cqlCompletion.minCompletion.iterator();
while (partIt.hasNext()) {
CqlPart part = partIt.next();
String css;
switch (part.type()) {
case KEYWORD:
css = "cq-hint-cqlKeyword";
break;
case TABLE:
css = "cq-hint-cqlTable";
break;
case COLUMN:
css = "cq-hint-cqlColumn";
break;
case KEYSPACE:
css = "cq-hint-cqlKeyspace";
break;
case INDEX:
css = "cq-hint-cqlIndex";
break;
case NOT_SUPPORTED:
css = "cq-hint-cqlNotSupported";
break;
case KEYWORD_VALUE:
css = "cq-hint-cqlKeywordValue";
break;
default:
css = null;
break;
}
if (css == null) {
buf.append(part.toDisplayString());
} else {
buf.append("<span class=\"").append(css).append("\">").append(part.toDisplayString());
if (partIt.hasNext()) {
buf.append(", ");
}
buf.append("</span>");
}