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 - Allow to jump to a line of code of an exception stack
Summary: Allow to jump to a line of code of an exception stack
Status: RESOLVED INVALID
Alias: None
Product: platform
Classification: Unclassified
Component: Output Window (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: _ tboudreau
URL:
Keywords:
Depends on:
Blocks: 35735
  Show dependency tree
 
Reported: 2003-08-21 11:14 UTC by mvinar
Modified: 2008-12-22 20:34 UTC (History)
0 users

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 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.