}
//
TableElement table = new TableElement().rightCellPadding(1);
table.row(
new LabelElement("NAME").style(Style.style(Decoration.bold)),
new LabelElement("DISPLAY NAME"),
new LabelElement("DESCRIPTION"),
new LabelElement("ACTIVE")
);
for (Map.Entry<Repl, Boolean> entry : repls.entrySet()) {
Boolean active = entry.getValue();
String langDescription = entry.getKey().getDescription();
String langDisplayName = entry.getKey().getLanguage().getDisplayName();
String langName = entry.getKey().getLanguage().getName();
table.row(
new LabelElement(langName).style(Style.style(Color.red)),
new LabelElement(langDisplayName != null ? langDisplayName : ""),
new LabelElement(langDescription != null ? langDescription : ""),
new LabelElement(active)
);
}
//
context.provide(new LabelElement("Current repl is " + current.getLanguage().getName() + "available repl are:\n"));
context.provide(table);
}
}