Wednesday, May 30, 2012

Eclipse's Java Stack Trace Console


Another one of these weird things that you don't know if it's deliberate or not. It's a good idea, paste some stack trace that you've copied from wherever, and it can help you find and open the source locations for editing or just perusal. But the implementation is really not that good. 

Exhibit A. We paste something like this:

True MySQLSyntaxErrorException (ProfileRequest.java:129)

Two links appear. Or: two blue underlines appear, appearing to be two links. In this example, 'MySQLSyntaxErrorException' forms one link, and the file name + line number the other, which is what I am actually after. But the links don't work separately. The first linkable thing found on each line seems to be what the whole line links to when you click.

I mean, just weird. Why show the second one as a link, if you don't have the time to implement it? Maybe it's using a regex syntax colorer or something.

The workaround is either to copy text with the intended links first on each line, or set the caret before the link and hit return to insert a linebreak before the intended link. The intended link will now be first on the next line, and thus we can click that line to open it.

And also, while I'm at it: don't keep multiple projects open, if they contain stuff that can confuse this thing. It seems it will not check further once it finds any library, source code or not, with a matching class name or whatever, even if there is another project that has source code for that class.

No comments:

Post a Comment