@@ -327,9 +327,11 @@ public class ProjectHelper {
public void init(String tag, AttributeList attrs) throws SAXParseException {
public void init(String tag, AttributeList attrs) throws SAXParseException {
task = project.createTask(tag);
task = project.createTask(tag);
project.currentTask = task;
configure(task, attrs);
configure(task, attrs);
task.setLocation(new Location(buildFile.toString(), locator.getLineNumber(), locator.getColumnNumber()));
task.setLocation(new Location(buildFile.toString(), locator.getLineNumber(), locator.getColumnNumber()));
task.init();
task.init();
project.currentTask = null;
// Top level tasks don't have associated targets
// Top level tasks don't have associated targets
if (target != null) {
if (target != null) {
@@ -355,20 +357,20 @@ public class ProjectHelper {
}
}
public void startElement(String name, AttributeList attrs) throws SAXParseException {
public void startElement(String name, AttributeList attrs) throws SAXParseException {
new NestedProperty Handler(this, task).init(name, attrs);
new NestedElement Handler(this, task).init(name, attrs);
}
}
}
}
/**
/**
* Handler for all nested properties.
* Handler for all nested properties.
*/
*/
private class NestedProperty Handler extends AbstractHandler {
private class NestedElement Handler extends AbstractHandler {
private DocumentHandler parentHandler;
private DocumentHandler parentHandler;
private Object target;
private Object target;
private Object child;
private Object child;
public NestedProperty Handler(DocumentHandler parentHandler, Object target) {
public NestedElement Handler(DocumentHandler parentHandler, Object target) {
super(parentHandler);
super(parentHandler);
this.target = target;
this.target = target;
@@ -393,7 +395,7 @@ public class ProjectHelper {
}
}
public void startElement(String name, AttributeList attrs) throws SAXParseException {
public void startElement(String name, AttributeList attrs) throws SAXParseException {
new NestedProperty Handler(this, child).init(name, attrs);
new NestedElement Handler(this, child).init(name, attrs);
}
}
}
}