boolean multiple = isMultipleTargets(ids);
ProgressObject po = runCommand(out, mgr, ids);
TargetModuleID[] done = po.getResultTargetModuleIDs();
out.println();
for(int i = 0; i < done.length; i++) {
TargetModuleID id = done[i];
out.print(DeployUtils.reformat(getAction()+" "+id.getModuleID()+((multiple && id.getTarget() != null) ? " on "+ id.getTarget().getName() : "")+(id.getWebURL() == null || !getAction().equals("Started") ? "" : " @ "+id.getWebURL()),4, 72));
if(id.getChildTargetModuleID() != null) {
for (int j = 0; j < id.getChildTargetModuleID().length; j++) {
TargetModuleID child = id.getChildTargetModuleID()[j];
out.print(DeployUtils.reformat(" `-> "+child.getModuleID()+(child.getWebURL() == null || getAction().toLowerCase().indexOf("started") == -1 ? "" : " @ "+child.getWebURL()),4, 72));
}
} // Also print childs if existing in earlier configuration
else{
java.util.Iterator iterator = DeployUtils.identifyTargetModuleIDs(allModules, id.getModuleID(), false).iterator();
if(iterator.hasNext()){
TargetModuleID childs = (TargetModuleID)iterator.next();
if(childs.getChildTargetModuleID() != null) {
for (int j = 0; j < childs.getChildTargetModuleID().length; j++) {
TargetModuleID child = childs.getChildTargetModuleID()[j];
out.print(DeployUtils.reformat(" `-> "+child.getModuleID()+(child.getWebURL() == null || getAction().toLowerCase().indexOf("started") == -1 ? "" : " @ "+child.getWebURL()),4, 72));
}
}
}
}
out.println();