This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | "Step Over" on <import/> steps into the imported file | ||
---|---|---|---|
Product: | debugger | Reporter: | Jiri Kovalsky <jkovalsky> |
Component: | Ant | Assignee: | Martin Entlicher <mentlicher> |
Status: | NEW --- | ||
Severity: | blocker | CC: | sustaining |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | The NPE I got in console. |
Description
Jiri Kovalsky
2006-06-28 14:51:22 UTC
Reproduced. Interestingly, I got a NPE in the console, which probably caused the debugger to stop inside the imported file. IMHO the bug is in step #4, not step #5. An import statement is not supposed to be an executable statement; it is a declaration. That is, the first statement to stop on should be build-impl.xml:5, i.e. step #4 should be skipped but step #5 is correct. Created attachment 31482 [details]
The NPE I got in console.
Jesse, IMHO there is also a problem in ANT, because build-impl.xml is not recognized as an ANT file and therefore dobj.getCookie(AntProjectCookie.class) gives null. But $ ant compile -f build-impl.xml works fine. So this should be corrected in ANT module. Perhaps you're right with the import statement, but it's less user-friendly when it goes inside automatically IMHO. build-impl.xml has no attrs on the <project> tag so it is not assumed to be an Ant script. This is as designed. (Could be a Maven POM, etc.) If you have code which expects an APC, do not rely on DataObject.getCookie. Use TargetLister.getAntProjectCookie or equivalent (this should probably be made an API sometime, feel free to file an RFE for it). I agree that jumping into build-impl.xml:5 when debugging "run" target is very user confusing. In my opinion Ant debugger should simply stop at "run" target and that's it. Jesse, TargetLister.getAntProjectCookie() is unfortunately package-private. I'll file a RFE to make it public. Is there a workaround in the mean time? getAntProjectCookie() caches the AntProjectCookie, so I guess creating new AntProjectSupport(fo); if there is no dobj cookie is not a good approach. IMHO the best is just to ignore the import statement as Jesse suggested and stop right before "-pre-run" at "<target name="run" depends="-pre-run, compile">" line. It should go into build-impl.xml when I do Step Into on "compile" at that line. Re. getAntProjectCookie - for now you can just copy the impl from TargetLister. moving opened issues from TM <= 6.1 to TM=Dev The issue hasn't passed the nomination process for 65patch2 by cut-off date. It has been moved to 65patch3. The status whiteboard "65fixes4-candidate" has been removed. At this time our proactive patches for the NetBeans 6.5.x IDE have concluded. If you own a Sun service plan contract for NetBeans, you may wish to contact Sun Service http://www.sun.com/contact/support.jsp to request a fix via the product defect escalation process. For more information on purchasing a Sun service plan contract for NetBeans, refer to the service plan item "Sun Software Service Plans (S3P) for Developers" in the Sun Service table found on our NetBeans Support Resources page http://www.netbeans.org/kb/support.html |