private void handleTarget(Target target, EasyAntReport eaReport) {
if (!"".equals(target.getName())) {
boolean isExtensionPoint = target instanceof ExtensionPoint;
if (!isExtensionPoint) {
TargetReport targetReport = new TargetReport();
targetReport.setName(target.getName());
StringBuilder sb = new StringBuilder();
Enumeration<?> targetDeps = target.getDependencies();
while (targetDeps.hasMoreElements()) {
String t = (String) targetDeps.nextElement();
sb.append(t);
if (targetDeps.hasMoreElements()) {
sb.append(",");
}
}
targetReport.setDepends(sb.toString());
targetReport.setDescription(target.getDescription());
targetReport.setIfCase(target.getIf());
targetReport.setUnlessCase(target.getUnless());
for (Iterator<?> iterator = target.getProject().getTargets().values().iterator(); iterator.hasNext();) {
Target currentTarget = (Target) iterator.next();
if (currentTarget instanceof ExtensionPoint) {
Enumeration<?> dependencies = currentTarget.getDependencies();
while (dependencies.hasMoreElements()) {
String dep = (String) dependencies.nextElement();
if (dep.equals(target.getName())) {
targetReport.setExtensionPoint(currentTarget.getName());
}
}
}
}
eaReport.addTargetReport(targetReport);
Message.debug("Ant file has a target called : " + targetReport.getName());
} else {
ExtensionPointReport extensionPoint = new ExtensionPointReport(target.getName());
StringBuilder sb = new StringBuilder();
Enumeration<?> targetDeps = target.getDependencies();
while (targetDeps.hasMoreElements()) {