DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=32267>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=32267 Summary: Target location is not set Product: Ant Version: 1.6.2 Platform: PC OS/Version: Linux Status: NEW Keywords: PatchAvailable Severity: trivial Priority: P1 Component: Core AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] When creating my own task, I tried to get Target.getLocation information but it is never set. May you please include the following patch to set Target location when parsing the build file with ProjectHelper2. Thank you in advance. *** ProjectHelper2.java.org 2004-07-16 09:57:32.000000000 +0200 --- ProjectHelper2.java 2004-11-17 10:20:42.139829000 +0100 *************** *** 121,126 **** --- 121,133 ---- newCurrent.setProject(project); newCurrent.setName(""); context.setCurrentTarget(newCurrent); + if (context.getLocator() != null) { + Location location = + new Location(context.getLocator().getSystemId(), + context.getLocator().getLineNumber(), + context.getLocator().getColumnNumber()); + newCurrent.setLocation(location); + } parse(project, source, new RootHandler(context, mainHandler)); newCurrent.execute(); } finally { *************** *** 758,763 **** --- 765,777 ---- Target target = new Target(); target.setProject(project); context.addTarget(target); + if (context.getLocator() != null) { + Location location = + new Location(context.getLocator().getSystemId(), + context.getLocator().getLineNumber(), + context.getLocator().getColumnNumber()); + target.setLocation(location); + } for (int i = 0; i < attrs.getLength(); i++) { String attrUri = attrs.getURI(i); -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]