Middle clicking does not do anything useful in the editor.
It should go to declaration of the item clicked on.
This would be really useful shortcut.
IDEA does this and I use that feature constantly.
Currently this is done by Ctrl + Left Mouse Click, but generally could be assigned to middle click as well. Ondro, would
you have any input on that?
I've no input. Sounds like a good thing to me.
Did not know that Ctl-Left Click did it. Could somebody please add that to the Help screens. On the Java editor
shortcuts this was not mentioned.
Not sure if having multiple ways of doing the same thing is good. But I like the idea of being able to move around the
code with speed and not having to involve both hands.
the most of Unix systems will insert a content of the clipboard by middle-click. And Unix users use middle click in
editor exactly for C&P. Don't you consider it as a problem?
Right about unix/linux. The keymap should really have this configurable. This way you can have a linux profile or a mac
osx profile each with different variations. Also the keymap should have a way to configure multiple shortcuts to the
I agree that we can't use middle click on unix systems. On Mac, it also has system function assigned, AFAIK.
But since we are already using platform specific keybindings, I don't see this as a reason why we could not use it on
win. Configuration seems needless here. Obviously, unix users will want to keep using copy&paste, some win users don't
care (because they are used to ctrl+click) and some win users will use it.
Ondro? Dusane? What do you think?
If we use mid-click for go to declaration on win (only), we'll make life a little bit easier for users coming from idea
and there's no downside to it. I would be for it, but I don't see it as high priority.
I started this thread so like to make a comment based on all the talking.
I agree its a nice little UI tweak for Windows. I like to see it make some todo list for future releases.
Lets fix it for 7.0
Dusan Balek agreed that he would review and integrate a patch for this issue contributed by the NetFIX  team.
Created attachment 86340 [details]
hg diff of HyperlinkOperation.java
I have attached a patch for this issue.
I have however noticed different behaviour in how it works between the XP desktop and Vista laptops at my disposal.
Whilst a single click was required on XP, I needed two clicks when I tested on Vista. The two clicks can be several
seconds apart so long as the mouse doesn't move. It seems as though there is some event listener that is keeping track
of the mouse position and (on Vista only and not XP) consumes the event if the position has changed. I was able to
determine that HyperlinkOperation always reports the clickCount as 1 even though I needed 2 clicks on Vista.
I have been unable to track down whether the first click gets swallowed on Vista. Any ideas on what might be going on here?
Dusane, would you please be so kind and share your opinion with Daniel Sheppard (dynamite) on the matter?
I don't think we have in Netbeans any special handling for mouse events under Vista OS. And I seriously doubt that there
is anything special for that in JDK. As for the patch I haven't tried it, but visually it looks ok. Neither Dusan nor I
have Windows readily available for testing, but I think we can test that the existing behavior is not broken on
linux/mac, integrate the patch and then let QE test the new functionality on Windows.
On my mac hyperlinks seem to work as before - so I consider the patch ok. Thanks
First of all, I tested the patch at Ubuntu and the behaviour is the same, what makes patch good for linux. For Windows XP
it works as expected too. I have no Vista workstation here to test it.
BTW, the license header should be updated AFAIK and thanks Daniel for your patch.
Is there any reason why this patch hasn't been integrated? It seems that everyone thinks that this is okay.
I will integrate it.
Thank you very much David and especially Daniel for contributing the patch!