Bug 92939 - Render links in the console as hyperlinks
Summary: Render links in the console as hyperlinks
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: 3.1 M7   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords: polish
: 93405 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-04-27 12:06 EDT by Erich Gamma CLA
Modified: 2005-05-06 13:46 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erich Gamma CLA 2005-04-27 12:06:20 EDT
The console view supports linking, but the links are only visible on mouse
hover. StyledText has recently added support for underline and this support
could be leveraged to render the links similar to links in a web browser.

CCing Christof since he has some code that does this and could be used in the
implementation.
Comment 1 Kevin Barnes CLA 2005-05-02 18:04:44 EDT
released changes to:
JavaConsoleTracker, JavaNativeConsoleTracker, JavaStackTraceHyperlink, jdt.debug.plugin.xml, 
TextConsoleViewer

System.out was very close to the default hyperlink color changed System.out to black.
Comment 2 Kevin Barnes CLA 2005-05-02 18:16:36 EDT
*** Bug 93405 has been marked as a duplicate of this bug. ***
Comment 3 Dani Megert CLA 2005-05-03 02:13:16 EDT
Just a reminder: make sure that the new code (after fixing bug 92939) no longer
calls StyledText.getLocationAtOffset(int) twice in a loop (see bug 65806) since
this can take up quite some time (==> the PR I filed is related to performance
instead of polish).

Not sure what Christof's code does but the best thing would be to use either use
- ITextPresentationListener and apply StyleRange.underline
- define your own annotation type and simply add an annotation using underline
drawing strategy
Comment 4 Christof Marti CLA 2005-05-03 04:27:16 EDT
I built it into the IPresentationRepairer, which is kind-of hardwired. An
ITextPresentationListener would incur a slightly smaller performance impact than
the annotation approach.
Comment 5 Kevin Barnes CLA 2005-05-03 09:48:18 EDT
TextConsoleViewer doesn't call getLocationAtOffset() at all anymore.
It still uses LineStyleListener to apply StyleRanges. Will look at ITextPresentationListener. 
thanks for the tip.
Comment 6 Kevin Barnes CLA 2005-05-03 16:52:22 EDT
Once the style is set we don't change it anymore - ie hyperlinks are always displayed in the hyperlink 
color and they are always underlined. ITextPresentationListener isn't necessary (in fact it never get any 
events).
Comment 7 Kevin Barnes CLA 2005-05-03 16:53:04 EDT
Darin, please verify
Comment 8 Darin Wright CLA 2005-05-06 13:46:25 EDT
Verified.