Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse jumps to definition while copy/pasting

Hopefully this is a quickie: I've been doing a lot of Java/Google Web Toolkit work in Eclipse lately and while I've liked it so far I've had one reoccurring issue that is starting to drive me batty. It seems pretty random, but frequent enough to be annoying: If I am doing a lot of copy/pasting I will suddenly find myself being whisked away to a function or variable definition by the IDE, often in a completely different file, at which point I usually end up accidentally copying over code I didn't intend to and needing to undo and reposition myself back to where I wanted. I'm pretty certain that it's a "jump to definition" shortcut that I keep hitting by accident, but I'm not certain what the shortcut is, what exactly triggers it, and most importantly how to turn it off!

Typically when this happens I am going through the following motions:

  • Double click on a word to highlight it
  • Press Ctrl + C to copy (seems like it may happen here)
  • Double click on another word
  • Press Ctrl + V to paste (happens here frequently)

The definition that I am sent to is not always the double-clicked word, but may be the last word that the cursor was on before the double click. My biggest issue is that I'm usually working fast enough that I don't catch exactly what actions just triggered the behavior.

I would really like to just kill off whatever is doing this (If I want to jump to definition I'll the context menu). Any hints as to how?

Using:

  • Eclipse 3.5 (Galileo)
  • Windows XP
like image 277
Toji Avatar asked Sep 04 '09 17:09

Toji


1 Answers

If you press Ctrl and click on a token in your code (like a variable or method name), Eclipse will take you to the token's definition.

I think you might be double-clicking and pressing Ctrl + C / Ctrl + V too fast.

To turn if off:

Window -> Preferences -> General -> Editor -> Text Editors -> Hyperlinking
Uncheck the box.

like image 110
Mario Marinato Avatar answered Oct 21 '22 07:10

Mario Marinato