There was a language switch in the team recently. The team used Eclipse as an IDE for a couple of years. The first thing that was done was installing the GoClipse plugin in Eclipse, but after a couple of hours some of the developers decided to quit Eclipse. One of them said:
GoClipse lacks major features, like autocomplete, navigating to functions and autoimport.
Aim: to provide a complete guide how to configure these features so that developers will continue to use GoClipse instead of replacing it by another IDE
Problems
Problem 1
CTRL+LMB results in:
Problem 2
Autocomplete, e.g. typing fmt.
results in:
Problem 3
Summary
There is no reason why GoClipse should be replaced by developers as the major features work in GoClipse as well
Answers
Answer 1
To enable navigating, i.e. CTRL+LMB, follow the instructions, i.e. issue go get -u golang.org/x/tools/cmd/oracle
and subsequently click Browse and select the path where the oracle
binary resides. Note: if export GOPATH=/path/to/workspace
then the binary resides in the bin directory of the project.
Answer 2
To enable autocomplete issue go get -u github.com/nsf/gocode
, click Browse and select the gocode binary (See answer 1)
To enable autoimport issue go get golang.org/x/tools/cmd/goimports
and add the path to goimports to the gofmt field.