over tasks git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274056 13f79535-47bb-0310-9956-ffa450edef68master
@@ -1,7 +1,7 @@ | |||||
/* | /* | ||||
* The Apache Software License, Version 1.1 | * The Apache Software License, Version 1.1 | ||||
* | * | ||||
* Copyright (c) 2000-2002 The Apache Software Foundation. All rights | |||||
* Copyright (c) 2000-2003 The Apache Software Foundation. All rights | |||||
* reserved. | * reserved. | ||||
* | * | ||||
* Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
@@ -563,6 +563,18 @@ public class IntrospectionHelper implements BuildListener { | |||||
} | } | ||||
} | } | ||||
/** | |||||
* Indicate if this element supports a nested element of the | |||||
* given name. | |||||
* | |||||
* @param elementName the name of the nested element being checked | |||||
* | |||||
* @return true if the given nested element is supported | |||||
*/ | |||||
public boolean supportsNestedElement(String elementName) { | |||||
return nestedCreators.containsKey(elementName); | |||||
} | |||||
/** | /** | ||||
* Stores a named nested element using a storage method determined | * Stores a named nested element using a storage method determined | ||||
* by the initial introspection. If no appropriate storage method | * by the initial introspection. If no appropriate storage method | ||||
@@ -269,10 +269,8 @@ public class UnknownElement extends Task { | |||||
UnknownElement child = (UnknownElement) children.elementAt(i); | UnknownElement child = (UnknownElement) children.elementAt(i); | ||||
Object realChild = null; | Object realChild = null; | ||||
if (parent instanceof TaskContainer) { | |||||
//ProjectComponentHelper helper=ProjectComponentHelper.getProjectComponentHelper(); | |||||
//realChild = helper.createProjectComponent( child, getProject(), null, | |||||
// child.getTag()); | |||||
if (!ih.supportsNestedElement(child.getTag()) | |||||
&& parent instanceof TaskContainer) { | |||||
realChild = makeTask(child, childWrapper, false); | realChild = makeTask(child, childWrapper, false); | ||||
if (realChild == null) { | if (realChild == null) { | ||||
@@ -296,7 +294,8 @@ public class UnknownElement extends Task { | |||||
} | } | ||||
childWrapper.setProxy(realChild); | childWrapper.setProxy(realChild); | ||||
if (parent instanceof TaskContainer) { | |||||
if (parent instanceof TaskContainer | |||||
&& realChild instanceof Task) { | |||||
((Task) realChild).setRuntimeConfigurableWrapper(childWrapper); | ((Task) realChild).setRuntimeConfigurableWrapper(childWrapper); | ||||
} | } | ||||