ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject svn commit: r442369 - in /ant/core/trunk/src: main/org/apache/tools/ant/taskdefs/MacroInstance.java testcases/org/apache/tools/ant/LocationTest.java
Date Mon, 11 Sep 2006 22:02:00 GMT
Author: peterreilly
Date: Mon Sep 11 15:01:59 2006
New Revision: 442369

URL: http://svn.apache.org/viewvc?view=rev&rev=442369
Log:
make macrodef.backtrace=false cause all the nested tasks/types to have the same location as
the macrodef instance

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/MacroInstance.java
    ant/core/trunk/src/testcases/org/apache/tools/ant/LocationTest.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/MacroInstance.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/MacroInstance.java?view=diff&rev=442369&r1=442368&r2=442369
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/MacroInstance.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/MacroInstance.java Mon Sep 11 15:01:59
2006
@@ -249,7 +249,8 @@
         ret.setQName(ue.getQName());
         ret.setTaskType(ue.getTaskType());
         ret.setTaskName(ue.getTaskName());
-        ret.setLocation(ue.getLocation());
+        ret.setLocation(
+            macroDef.getBackTrace() ? ue.getLocation() : getLocation());
         if (getOwningTarget() == null) {
             Target t = new Target();
             t.setProject(getProject());

Modified: ant/core/trunk/src/testcases/org/apache/tools/ant/LocationTest.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/testcases/org/apache/tools/ant/LocationTest.java?view=diff&rev=442369&r1=442368&r2=442369
==============================================================================
--- ant/core/trunk/src/testcases/org/apache/tools/ant/LocationTest.java (original)
+++ ant/core/trunk/src/testcases/org/apache/tools/ant/LocationTest.java Mon Sep 11 15:01:59
2006
@@ -52,7 +52,7 @@
         assertFalse(c.getLocation().getLineNumber() == 0);
     }
 
-    public void XtestMacrodefWrappedTask() {
+    public void testMacrodefWrappedTask() {
         executeTarget("testMacrodefWrappedTask");
         Echo e = (Echo) getProject().getReference("echo3");
         assertTrue(getLog().indexOf("Line: " 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message