Community
Participate
Working Groups
I think the Ctrl-key is not a good choice to invoke this feature. Try the following: Integer.MAX_VALUE; Integer.MAX_VALUE; Integer.MAX_VALUE; Integer.MAX_VALUE; Long.MAX_VALUE; Now select "Long" press CTRL + C. Now place your mouse over the first "Integer" and double click on text (to select it) and press CTRL + V to replace it with "Long". Do the same with the other "Integer"s -- and do it fast. I'd bet you will open the java.lang.Integer. OK, one could use Search/Replace in this case, but most of the time -- if you only have a few thinks to replace one will use this double-click/Ctrl + V strategy. Another pitfall ... one wants to use code assist. Again we're in the flow and are not really paying attention. Unfortunately we end up with the following order of key press/mouse click: Ctrl, left mouse click, Space -- oops. Before we had this feature one could almost simultaniously press Ctrl + Space and click with left mouse button. I suggest using the Alt-key.
We already discussed that the Ctrl modifier might not be the best choice. I actually would like to get the link feature without any keyboard interaction: sometimes I'd like to be able to navigate through my code just by mouse.
My proposal w/o keyboard interaction is to use the middle mouse button. When the mouse is moved, a background thread is launched to search for an associated declaration. If it finds a declaration, the text turns into a link, and it can be visited by pressing the middle mouse button. The only problem I see here is that middle mouse button is typically paste on platforms with X. But then again, Eclipse is not honoring middle mouse button at all, until now. Erich, do you have any feelings regarding the alternatives? (different key modifier vs. middle mouse button)? The Ctrl was better than Alt in that it it's easier to find blindly on a keyboard. Alt is a rarely pressed modifier... In this case it's truly an alternative though.
X users will expect a paste operation if one uses the middle mouse button (see bug 6725). Users w/out a third mouse button will not profit from this feature. Two other suggestions: a) Place a toggle button "Link Navigation Mode" next to the "Show Source of Selected Element Only" and "Show Hover Text" buttons on the main toolbar. b) Place a checkmark menu item on the editor tab's menu "Link Navigation Mode" In "Link Navigation Mode" you'd have the same kind of browsing you have now if you constantly hold the Ctrl-key down. There should still be a key you can hold down to temporarily enter the "Link Navigation Mode". @@@@ Still, I think the Ctrl-key should not be used to enter the "Link Navigation Mode" because of the problems I indicated above.
I agree that middle mouse button should not be the only way to trigger the link. I feel like I still need more opinions on how this kind of navigation should be made accessible to make a proper decision.
To avoid the temporary link highlight I suggest to only switch to the link highlight mode once the ctrl key was pressed AND the mouse has moved.
Implemented behaviour suggested by Erich >= 20021112 (not in warmup integration build). I don't think using Alt modifier would work since pressing Alt on windows activates the menu bar. No more key or mouse events are sent during this time. A toggle button/checkbox would be too heavyweight. Following links should be a light weight operation, w/o requiring to enter a 'persistent' navigation-mode. The bug remains open...
I realized that the case when I use both mouse and keyboard at the same time is when I cut/copy/paste with keyboard (Ctrl-[XCV]) and select text regions to cut/copy with the mouse. It is very irritating to see the link highlight when doing these operations.
*** This bug has been marked as a duplicate of 27231 ***
.