Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Weird Java editor behaviour
Weird Java editor behaviour [message #956890] Wed, 24 October 2012 22:03 Go to next message
Alan DW is currently offline Alan DWFriend
Messages: 119
Registered: March 2012
Senior Member
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 15:48 Go to previous messageGo to next message
Thomas   is currently offline Thomas Friend
Messages: 12
Registered: October 2012
Junior Member
"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 10:24 Go to previous messageGo to next message
Alan DW is currently offline Alan DWFriend
Messages: 119
Registered: March 2012
Senior Member
@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 09:29 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
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: Thu Mar 28 19:07:38 GMT 2024

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

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

Back to the top