Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 174235 - [api][navigation] Cannot resolve conflicting hyperlinking directors
Summary: [api][navigation] Cannot resolve conflicting hyperlinking directors
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.3   Edit
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: 3.3 M6   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 112630
  Show dependency tree
 
Reported: 2007-02-14 17:32 EST by Michael Rennie CLA
Modified: 2007-03-20 12:15 EDT (History)
5 users (show)

See Also:


Attachments
First cut of a fix (awaits PMC approval) (34.03 KB, patch)
2007-03-02 10:33 EST, Dani Megert CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Rennie CLA 2007-02-14 17:32:44 EST
Using the new API from bug 88293, there is no way to resolve which director should be used if more than one will produce the same region as a hyperlink location.

For example, the fix to bug 112630 will produce a hyperlink for the region of a method, and so will the default java editor director. The only way to use the feature from 112630 is to disable the default one and enable the step into one.

One suggested solution would be to allow differing modifier keys, that way we could make the step into hyperlinking use Ctrl+Alt (or the like).
Comment 1 Dani Megert CLA 2007-02-15 02:55:18 EST
This is a known issue and already on the Text plan

We won't go for the modifier solution. Possible solutions are:
- allow to order them on the preference page
- we do it as we do it for the hovers: sort them by dependency (if A depends
  on B then A's contribution wins). This would enable your link detector (which
  of course should only detect during debugging and in editors of files that
  are on the current debug target's class path)
- show all existing links in a hover [obviously the best solution but not sure
  we have time for this]
Comment 2 Michael Rennie CLA 2007-02-15 09:25:42 EST
Why would you not do the modifier solution? If users could specify their own desired modifiers then we could have multiple hyperlink directors available at any one time. 

Use case: while I am debugging at any one time I have the abiltiy to hyperlink to the definition of a method, etc (as is now), AND I have the abiltiy to step into selection, where all I have to do is use a differnt keypress prior to clicking....basically you have the extensibiltiy and customizability of a menu command this way.

some thoughts about your proposed solutions
1. ordering them on a pref pages could mean that I would have to open the page and change ordering every single time I was debugging and wanting to use hyperlink step into, and then when I was done debugging I would have to change it back (over and over again...).

2. I am not sure how you work it for hovers, but the hyperlink step into is only enabled when debugging (it follows the same criteria as the original step into selection command)

3. Personally I would find this solution the most annoying. If I understand it correctly: I would have to activate the link, wait for a popup, read all the choices, and make another selection? This use case makes the point of hyperlinking less awesome if I have to make further choices and selections AFTER clicking the link (where traditionally the link has immediately performed an action). For our step into selection, it would be simpler to select the method and hit Ctrl+R as opposed to this resolution strategy.
Comment 3 Dani Megert CLA 2007-02-15 09:47:19 EST
How can you speculate on 3?
Comment 4 Michael Rennie CLA 2007-02-15 09:58:37 EST
I was just giving my opion of what I gathered from your description of 3. 

For all I know there could be precident, or some other reason for using hovers for conflicting action resolution.
Comment 5 Dani Megert CLA 2007-02-15 10:21:23 EST
re 1: why would you have to do that? Debug would just be top and since the debug detector would only be active and detect links if it is requested in a file that is on the class path then we're just fine. Similar to the default hover where it shows the value while in debug mode.

Is currently the JDT or the Debug detector winning?
Comment 6 Michael Rennie CLA 2007-02-15 10:33:31 EST
Currently, for 1, the JDT direct always wins i.e. the debug one is never used. The only way I could test it was to turn off the JDT director completely.
Comment 7 Markus Keller CLA 2007-02-27 04:52:31 EST
In I20070220-1330, the debug link always wins when a debug session is active. I found this sudden change of Ctrl+Click behavior to be very confusing.

I consider the current behavior a bug, since the well-known navigation by Ctrl+Click does not work anymore in debug mode, and I did not change any settings.
Comment 8 Curtis Windatt CLA 2007-02-27 15:55:17 EST
I agree with the comments by Markus and Mike.

The user needs some way on controlling which action is going to happen, or at least it must be clear to the user which action will take place.  I've been working in I20070220-1330 and having the "step into" hyperlink run instead of the "jump to file" hyperlink some of the time is very confusing.

I think that having a key modifier would be excellent.  Gives the user control over the behaviour.  Will having a hover will slow down the user, making the "step into" feature less useful?.  Ordering by preference page or dependency doesn't make it any clearer to the user what will happen when they click on a link.  
Comment 9 Dani Megert CLA 2007-03-02 10:32:10 EST
After playing around and testing various approaches I came to the conclusion that configurable modifier keys is the best solution for now.
Comment 10 Dani Megert CLA 2007-03-02 10:33:23 EST
Created attachment 60166 [details]
First cut of a fix (awaits PMC approval)
Comment 11 Mike Wilson CLA 2007-03-05 16:17:40 EST
Of course, the "joy" of the simpler strategy is that, by forcing you to read what is in the pop up, you can educate the user about is available. With the modifier key base solution, will the user ever notice that anything other than the un-modified hyperlink is available?
Comment 12 Dani Megert CLA 2007-03-11 11:48:36 EDT
No. You will get what either the detector provider or the user (via prefs) decided to appear under a given modifier. This is the same as we have for years with the hovers. The popup-navigation solution makes navigation slower and is not feasible for 3.3.
Comment 13 Dani Megert CLA 2007-03-11 12:11:59 EDT
>will the user ever notice that anything other than
>the un-modified hyperlink is available?
The popup solution wouldn't fix this because also the popup based solution would be triggered off a (configured) modifier.
Comment 14 Mike Wilson CLA 2007-03-12 13:38:44 EDT
+1
Comment 15 Dani Megert CLA 2007-03-13 04:32:59 EDT
Committed to HEAD.
Available in builds >= I20070311-0800.

Remaining issues to be cleaned up during M7 are covered in bug 177112.
Comment 16 Karsten Becker CLA 2007-03-20 12:13:20 EDT
Verified in Build I20070320-0010
Comment 17 Dani Megert CLA 2007-03-20 12:15:35 EDT
.