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 35668

Summary: Allow to jump to a line of code of an exception stack
Product: platform Reporter: mvinar <mvinar>
Component: Output WindowAssignee: _ tboudreau <tboudreau>
Status: RESOLVED INVALID    
Severity: blocker    
Priority: P3    
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 35735    

Description mvinar 2003-08-21 11:14:08 UTC
User problem:
-----------------------------------
--

User need:
-----------------------------------
The user needs to be able to jump to a line of
code of an exception stack or a println.

Product requirement:
-----------------------------------
All output that has a line number associated with
it should be navigatable to the source code.For
println debugging messages entered by the user,
recognize some patterns and suggest those to the
user (?)
Comment 1 _ tboudreau 2003-08-24 01:33:14 UTC
There is something clever (but bad for performance) that
one could do, in the handler that reroutes data to the
output window.  It would only work for internal execution:

try {
Exception e = new Exception();
throw e;
} catch (Exception e) {
StackTraceElement[] st = e.getStackTrace();
StackTrace elem = st[*however many calls back user code is*]
//get the file and line from the elemnt, call DataObject.find,
navigate to the line

The nice thing is it would work for any output.
However, throwing and catching exceptions has high
overhead (maybe not so high since the JVM doesn't have to
unroll that much stack - just the try block).

Couldn't possibly work for an external process, though.
We *could* allow it to be an output window option only
enabled for internal execution though - could be a good
use for those buttons in the titlebar.

Hack factor: 7 (probably impossible to ever make totally
  reliable for everything)
Difficulty: 6 

Both items lower if we only implement the above case.
But not that much lower.
Comment 2 Jesse Glick 2004-07-24 20:05:08 UTC
Have always had stack hyperlinking.