GoClipse / goclipse

Eclipse IDE for the Go programming language:
http://goclipse.github.io/
Eclipse Public License 1.0
841 stars 290 forks source link

Ctrl+hover/Cmd+hover does not work as expected #216

Open maxandersen opened 7 years ago

maxandersen commented 7 years ago

I'm used to language editors in eclipse that have F3 (go to declaration) to have Ctrl+hover mouse highlight things that are navigatable.

Instead in goeclipse it is kinda of a "lottery" to know if something is possible to open.

If one press F3 it jumps/go to the declaration if it can and otherwise a dialog is shown saying it is not possible and I have to close it and try again.

Is there a reason why eclipse default "highlight declarations" are not working ? bug or expected ?

sanmai commented 7 years ago

Possibly related: #111 #70

bruno-medeiros commented 7 years ago

@maxandersen Yeah, not a bug, it's a limitation arising from the fact that Goclipse uses an external tool for such semantic operations (as opposed to JDT or CDT that have their semantic engine built-in). So you only know the result of the editor hyperlink (Ctrl + hover) after invoking it. That said there are some improvements that could be made to this:

  1. Filter Go language keywords from hyperlink words. Fairly trivial.
  2. Filter declarations names from hyperlink words, using the source Structure information (ie, the Outline information). Not so trivial.
maxandersen commented 7 years ago

thanks for the explanation @bruno-medeiros and I was guessing this was the case.

May I suggest to at least don't show an error dialog when F3 does not work but simply report status warning/error so eclipse will just show in status bar nothign was found for selection rather than having a modal dialog that needs to get dismissed by user ?

bruno-medeiros commented 7 years ago

Yeah, could do that, it would be similar to completion tool failures actually.