public Col wrap() { return wrap(true); }
public Col wrap() { return wrap(true); }
List<String> wrapped = new ArrayList<>(); for (String line : lines) { wrapped.addAll(wrap(line));
List<String> wrapped = new ArrayList<>(); for (String line : lines) { wrapped.addAll(wrap(line));
@Override public void endPara() { if (sb.length() > 0) { ShellTable table = new ShellTable().noHeaders().separator("").size(maxSize - 1); table.column("").maxSize(indent.length()); table.column("").wrap(); table.addRow().addContent(indent, sb.toString()); table.print(out); sb.setLength(0); } else { out.println(); } }
@Override public void endPara() { if (sb.length() > 0) { ShellTable table = new ShellTable().noHeaders().separator("").size(maxSize - 1); table.column("").maxSize(indent.length()); table.column("").wrap(); table.addRow().addContent(indent, sb.toString()); table.print(out); sb.setLength(0); } else { out.println(); } }
table.column(new Col("Description").wrap()); for (Map.Entry<String,String> entry : commands.entrySet()) { String key = NameScoping.getCommandNameWithoutGlobalPrefix(session, entry.getKey());
table.column(new Col("Description").wrap()); for (Map.Entry<String,String> entry : commands.entrySet()) { String key = NameScoping.getCommandNameWithoutGlobalPrefix(session, entry.getKey());
public Void apply(MetaTypeService metaTypeService) { ObjectClassDefinition def = getMetatype(metaTypeService, pid); if (def == null) { System.out.println("No meta type definition found for pid: " + pid); return null; } System.out.println("Meta type informations for pid: " + pid); ShellTable table = new ShellTable(); table.column("key"); table.column("name"); table.column("type"); table.column("default"); table.column("description").wrap(); AttributeDefinition[] attrs = def.getAttributeDefinitions(ObjectClassDefinition.ALL); if (attrs != null) { for (AttributeDefinition attr : attrs) { table.addRow().addContent(attr.getID(), attr.getName(), getType(attr.getType()), getDefaultValueStr(attr.getDefaultValue()), attr.getDescription()); } } table.print(System.out); return null; }
public Void apply(MetaTypeService metaTypeService) { ObjectClassDefinition def = getMetatype(metaTypeService, pid); if (def == null) { System.out.println("No meta type definition found for pid: " + pid); return null; } System.out.println("Meta type informations for pid: " + pid); ShellTable table = new ShellTable(); table.column("key"); table.column("name"); table.column("type"); table.column("default"); table.column("description").wrap(); AttributeDefinition[] attrs = def.getAttributeDefinitions(ObjectClassDefinition.ALL); if (attrs != null) { for (AttributeDefinition attr : attrs) { table.addRow().addContent(attr.getID(), attr.getName(), getType(attr.getType()), getDefaultValueStr(attr.getDefaultValue()), attr.getDescription()); } } table.print(System.out); return null; }