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.

Bug 205359

Summary: Stack trace parsing/hyperlinking API
Product: java Reporter: Jesse Glick <jglick>
Component: ClasspathAssignee: Tomas Zezula <tzezula>
Status: NEW ---    
Severity: normal CC: gtzabari, markiewb, mkleint
Priority: P3 Keywords: API
Version: 7.1   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on: 217591    
Bug Blocks: 166379, 183938, 222587, 229286    

Description Jesse Glick 2011-11-21 14:49:05 UTC
Numerous pieces of code in the IDE - Ant's <java> handler, Maven's OutputUtils, Hudson's console and test failure handler, etc. - try to recognize Java stack trace lines and hyperlink them. Certain impls handle certain things which others do not:

- search a project-defined classpath or sourcepath first, then fall back to GlobalPathRegistry if necessary
- top-level private classes should be linked, so in "\tat p.B(A.java:123)" hyperlink p/A.java at line 123
- matching line should always be hyperlinked immediately (fast check); if and when clicked, look up source file, and print warning if not found (maybe use SourceJavadocAttacher if binary class can be found!)
- support for unusual line patterns such as produced by Logback or JRockit

There should be a single well-tested API which handles stack traces and gets reused by all of these.

Maybe also integrate with External Execution API for convenience.
Comment 1 Jesse Glick 2011-12-20 13:49:21 UTC
(In reply to comment #0)
> Maybe also integrate with External Execution API for convenience.

See MavenFileLocator implements LineConvertors.FileLocator for example.
Comment 2 Jesse Glick 2012-03-06 14:20:02 UTC
Not in 7.2.
Comment 3 Jesse Glick 2013-02-12 14:06:51 UTC
Another buglet I noticed (in a Maven project using CoS, i.e. in JavaAntLogger) which would be best fixed in a single point: Java 7 suppressed exceptions are not hyperlinked at all, due to the extra \t prepended to each line. So matching /^\t(…)$/ should really be /^\t+(…)$/ to handle possible nesting.