in command-line-debugger/src/main/java/org/apache/ant/debugger/Inspector.java [14:55]
public void execute(Project project, String[] params) {
if (params.length > 1 && "/?".equals(params[1])) {
printUsage(project);
return;
}
if (params.length < 3) {
project.log("Incorrect Parameters");
printUsage(project);
return;
}
if ("property".equalsIgnoreCase(params[1])) {
// show all matches for a property
Object value = PropertyHelper.getProperty(project, params[2]);
if (value != null) {
project.log("Detected a property by name [" + params[2]
+ "]. Current value: " + value);
} else {
project.log("Found no such property.");
}
} else if ("path".equalsIgnoreCase(params[1])) {
// look optional component
// the remaining part of the string could be:
// id=<someid> or refid=<somerefid>
Object ref = project.getReference(params[2]);
if (ref instanceof ResourceCollection) {
if (ref != null) {
PathConvert path = (PathConvert) project
.createTask("pathconvert");
path.setProject(project);
path.setPathSep(StringUtils.LINE_SEP + " - ");
path.add((ResourceCollection) ref);
path.execute();
} else {
project.log("No path-reference found for " + params[2]);
}
} else {
project.log("No path found for reference id: " + params[2]);
}
}
}