views:

111

answers:

1

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
+1  A: 

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 fastly.

Mario Marinato -br-
Probably. My fingers tend to work faster than my brain with things like this. Is there any way to turn it off?
Toji
Is there is: Window -> Preferences -> General -> Editor -> Text Editors -> HyperlinkingUncheck the box.
Mario Marinato -br-
Excellent! That does it! Thank you very much, you've just saved me a lot of frustration!
Toji
Serving well to always serve.
Mario Marinato -br-