private String shell = "";
public void register(final Command command, Map<String, ?> properties) {
String shellName = (String) properties.get("shell");
if( shellName!=null ) {
Layout layout = getLayoutForShell(shellName);
String id = command.getId();
String alias = (String) properties.get("alias");
if( alias == null ) {
alias = id;
int p;
if( (p=alias.lastIndexOf(":")) >= 0 ) {
alias = alias.substring(p+1);
}
layout.add(new CommandNode(alias, id));
} else {
String[] aliases = alias.split(",");
for (String a : aliases) {
a = a.trim();
if( a.length()> 0 ) {
layout.add(new CommandNode(a, id));
}
}
}
}