Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 120863

Summary: Support Ctrl modifier on console hyperlinks
Product: [Eclipse Project] Platform Reporter: Ed Burnette <ed.burnette>
Component: DebugAssignee: Kevin Barnes <cocoakevin>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: darin.eclipse
Version: 3.2   
Target Milestone: 3.2 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Ed Burnette CLA 2005-12-14 09:04:44 EST
3.2M3. I'm not sure if this belongs in Platform/UI or Platform/Debug.
I wrote a class that implements IConsoleLineTrackerExtension and use it to watch for certain patterns in a program's output, and I also wrote another class that implements IHyperlink. In the IConsoleLineTrackerExtension.lineAppended(IRegion line) method, I use IConsole.addLink() to add my hyperlink when the pattern is seen. In the implementation of IHyperlink.linkActivated() I open the file being linked to. This works fine, but I want to do something different if the user does a control-click on the link as opposed to a regular click. The linkActivated() method doesn't take a modifier so I don't see a way to tell click from control-click. This is a request to provide a way to do that.

I need this for an RCP app I'm writing so if this involves a code change then I would be happy to supply a patch for it if someone will describe the change that is necessary. For example, there might need to be an IHyperLink2 interface that extends IHyperlink and has an additional method. TextConsoleViewer.mouseUp(MouseEvent) could check to see which interface you're using. Or there could be a new method that sets the modifier right before the regular linkActivated() call is made. I'm not sure what the standard practice for that is. Of course it would have to not mess up keyboard navigation too.
Comment 1 Darin Wright CLA 2005-12-14 09:16:56 EST
The console plug-in is owned by debug.
Comment 2 Ed Burnette CLA 2005-12-17 17:02:45 EST
See also bug 88293.
Comment 3 Darin Wright CLA 2005-12-19 14:06:16 EST
Will investigate for m5
Comment 4 Darin Wright CLA 2006-01-30 14:59:33 EST
Fixed.

* Added IHyperlink2 - linkActivated(Event)
* Changes to TextConsoleViewer: added an SWT.MouseUp listener to the text widget in order to capture the Event, similar to IAction.
Comment 5 Darin Wright CLA 2006-01-30 15:00:08 EST
Please verify, Kevin.
Comment 6 Kevin Barnes CLA 2006-02-03 12:09:48 EST
verified