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 - Stack trace parsing/hyperlinking API
Summary: Stack trace parsing/hyperlinking API
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Classpath (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal with 2 votes (vote)
Assignee: Tomas Zezula
URL:
Keywords: API
Depends on: 217591
Blocks: 166379 183938 222587 229286
  Show dependency tree
 
Reported: 2011-11-21 14:49 UTC by Jesse Glick
Modified: 2015-02-17 20:37 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.