System.out.println(" " + resources[resIdx].getPresentationName() + " (" + resources[resIdx].getVersion() + ")");
if (why) {
Reason[] req = resolver.getReason(resources[resIdx]);
for (int reqIdx = 0; req != null && reqIdx < req.length; reqIdx++) {
if (!req[reqIdx].getRequirement().isOptional()) {
Resource r = req[reqIdx].getResource();
if (r != null) {
System.out.println(" - " + r.getPresentationName() + " / " + req[reqIdx].getRequirement().getName() + ":" + req[reqIdx].getRequirement().getFilter());
} else {
System.out.println(" - " + req[reqIdx].getRequirement().getName() + ":" + req[reqIdx].getRequirement().getFilter());
}
}
}
}
}
}
resources = resolver.getOptionalResources();
if ((resources != null) && (resources.length > 0)) {
System.out.println();
System.out.println("Optional resource(s):");
printUnderline(System.out, 21);
for (int resIdx = 0; resIdx < resources.length; resIdx++) {
System.out.println(" " + resources[resIdx].getPresentationName()
+ " (" + resources[resIdx].getVersion() + ")");
if (why) {
Reason[] req = resolver.getReason(resources[resIdx]);
for (int reqIdx = 0; req != null && reqIdx < req.length; reqIdx++) {
if (!req[reqIdx].getRequirement().isOptional()) {
Resource r = req[reqIdx].getResource();
if (r != null) {
System.out.println(" - " + r.getPresentationName() + " / " + req[reqIdx].getRequirement().getName() + ":" + req[reqIdx].getRequirement().getFilter());
} else {
System.out.println(" - " + req[reqIdx].getRequirement().getName() + ":" + req[reqIdx].getRequirement().getFilter());
}
}
}