英文:
import existing Go project into eclipse
问题
我已经在eclipse Neon上安装和配置了GOClipse v0.16.1(显然,我已经安装了GO并从命令行测试过)。
为了测试这个插件,我创建了一个GO项目,包含一个命令和一个包,进行了格式化、构建和运行命令。一切正常!
但是当我尝试导入一个现有的GO项目时,eclipse无法将其识别为GO项目。因此,我无法在eclipse中构建它。源代码位于$GOPATH/src目录中,其中包含了测试项目的代码。
我还需要做其他的事情吗?
英文:
I've installed and configured GOClipse v0.16.1 on eclipse Neon (obviously, I've installed GO and tested it from command line).
To test the plugin, I created a GO project with a command and a package, formatted, built and ran the command. All good!
But when I try to import an existing GO project, eclipse doesn't recognise it as a GO project. Hence, I can't build it from within eclipse. The source is located in $GOPATH/src where the test project's code is.
Is there anything else I need to do?
答案1
得分: 4
“将现有项目导入工作区”向导仅适用于现有的Eclipse项目,也就是说,只有已经存在Eclipse的.project
文件的位置才能使用该向导。
如果你只有一个Go项目,你应该使用Eclipse的“新建Go项目”向导,并在向导中指定你现有Go项目的位置。
英文:
The "Import existing projects into workspace" wizard only works for existing Eclipse projects, that is, locations that have Eclipse's .project
file already.
If you have just a Go project, you should use the Eclipse "New Go Project" wizard, and specify on the wizard the location of your existing Go project.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论