Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Weird Java editor behaviour
Weird Java editor behaviour [message #956890] Wed, 24 October 2012 18:03 Go to next message
Eclipse UserFriend
Hello everyone,

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
Re: Weird Java editor behaviour [message #957914 is a reply to message #956890] Thu, 25 October 2012 11:48 Go to previous messageGo to next message
Eclipse UserFriend
"Go to definition" is also mapped to Ctrl-Click.

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.
Re: Weird Java editor behaviour [message #960275 is a reply to message #957914] Sat, 27 October 2012 06:24 Go to previous messageGo to next message
Eclipse UserFriend
@Thomas: Yes, that's probably the reason... Is there a way to re-map the "CTRL+Click" functionality to, for example, ALT+Click?

Thanks,


Alan
Re: Weird Java editor behaviour [message #962732 is a reply to message #960275] Mon, 29 October 2012 05:29 Go to previous message
Eclipse UserFriend
On 27.10.2012 12:24, Alan DW wrote:
> @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

Dani
>
> Thanks,
>
>
> Alan
Previous Topic:Equals/HashCode Generator sorting fields
Next Topic:How do I create an Eclipse project file?
Goto Forum:
  


Current Time: Fri May 16 14:17:19 EDT 2025

Powered by FUDForum. Page generated in 0.05476 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top