Closed acleone closed 8 years ago
Hum, I'm thinking that in addition to this, it would be a good thing to actually have a preference option to enable whether the project location is added to the GOPATH or not. Would you be willing to have a go at it, or shall I do it?
Thanks for the merge!
I'm not familiar with the preferences/UI code, so I'll let you take it.
Previously, the project root was being added to the beginning of GOPATH, and jump to definition would error out with errors like:
file not in the Go environment.
With GOPATH set to /home/alex/myproject/mygopath and the project root at /home/alex/myproject
This is because the project root was being implicitly added before the other GOPATH changes, and GoPath.java::findGoPackageForLocation(Location goPackageLocation) would find the implicit path first, and try to resolve the package name against '/home/alex/myproject/src' instead of '/home/alex/myproject/mygopath/src'.