Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsWeird Java editor behaviour
https://www.eclipse.org/forums/index.php/mv/msg/414122/956890/#msg_956890
I'm using Eclipse for years now to develop Java applications. I don't know why, but the following has happened to me several times within the java source editor:
1) Select some source code text with your mouse
2) Press CTRL+C (or CTRL+X doesn't matter)
3) Select another position in the text
4) Press CTRL+V
... and the really strange thing is that upon pressing CTRL+V, the editor jumps to the declaration (!) of the type of the variable closest to the insert position and inserts the text THERE. I don't know if that is a bug or just my stupidity, but I'm *absolutely* sure that "go to definition" is mapped to the F3-Key on my keyboard, which is impossible to touch by accident. Happened to me on Gallileo, Helios, Indigo and now Juno, both on Windows and Linux, on different machines.
Does someone has any explanation what causes this unwanted "go to definition" behaviour when copy-pasting text around (and more importantly: how to fix this)? Maybe it's some hot key sequence that I don't know or mouse gesture or... you name it ^_^'
Thanks,
Alan]]>Alan DW2012-10-24T22:03:34-00:00Re: Weird Java editor behaviour
https://www.eclipse.org/forums/index.php/mv/msg/414122/957914/#msg_957914
The same thing has happened to me, although fairly rarely. My guess as to what is happening is that when you click you are either still pressing Ctrl from the copy, or are pressing it in anticipation of the paste, and so it sees it as a Ctrl-Click and thus goes to definition. If this is the case, then the only thing that can be done is to be more careful about when you are pressing Ctrl.]]>Thomas 2012-10-25T15:48:36-00:00Re: Weird Java editor behaviour
https://www.eclipse.org/forums/index.php/mv/msg/414122/960275/#msg_960275
Thanks,
Alan]]>Alan DW2012-10-27T10:24:19-00:00Re: Weird Java editor behaviour
https://www.eclipse.org/forums/index.php/mv/msg/414122/962732/#msg_962732
> @Thomas: Yes, that's probably the reason... Is there a way to re-map
> the "CTRL+Click" functionality to, for example, ALT+Click?
See Preferences > General > Editors > Text Editors > Hyperlinking