Eclipse参考目录在eclipse项目目录之外,但在存储库中 [英] Eclipse reference directory outside eclipse project directory but within repository

查看:191
本文介绍了Eclipse参考目录在eclipse项目目录之外,但在存储库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

[更新:查看评论]

[Update: See comments]

所以说我有一个这样的结构:

So lets say I have a structure like this:

trunk / src

/trunk/src

/ trunk / platform / linux / [eclipse project]

/trunk/platform/linux/[eclipse project]

/ trunk / platform / windows / [eclipse project]

/trunk/platform/windows/[eclipse project]

我希望这两个项目能够看到/ trunk / src,打开它的文件,并使用这些文件的自动错误突出显示。我已经尝试创建链接资源到目录。这是非常有效的限制。除非您重新导入,否则不会更新,也不能创建/删除文件。我尝试在git repo中存储一个符号链接,显然是git 1.6.1不再有效。我尝试了,克隆时,我们的破碎的符号链接。

I want both project to be able to see /trunk/src, open its files and use the automatic error highlighting on those files. I've tried creating Linked Resources to the directory. This works great with nasty limitations. It never updates unless you re-import and you can't create/delete files. I tried storing a symbolic link in the git repo which apparently as of git 1.6.1 no longer works. I tried anyway and upon cloning the symbolic link comes our broken.

这真的只是为了轻松访问多平台项目的主要代码库。该解决方案不需要优雅,但重要的是。所以我想我可以指示每个开发人员只是自己的sym链接到主要的代码库作为开发环境设置的一部分。尝试并用ln -s创建的这些符号链接似乎没有出现在Eclipse中,也不能被导入。

This is really just for ease of access to the main codebase for a multi platform project. The solution need not be elegant but it is important. So I figure I can instruct each dev to just make their own sym link to the main codebase as part of dev environment setup. Tried and these symbolic links created with ln -s do not seem to appear in Eclipse nor can they be imported.

最后我想我可以在/ trunk中创建一个总体项目/在Eclipse中。似乎Eclipse是聪明的足以警告我,这是不可能的,因为它检测到更深入的其他项目。

Finally I figured I could create a General Project in /trunk/ within Eclipse. Seems Eclipse is "smart" enough to warn me that this is not possible because it detects other projects deeper in.

任何帮助赞赏。

推荐答案

首先,评论:

' / trunk / xxx / yyy '是一种SVN方法,其中所有分支/标签都被模拟为目录。

您不需要使用Git。两个分支(一个' linux ',一个' windows ')足够了那么您可以在 windows 目录中的一个 linux 目录中克隆您的回购两次。

'/trunk/xxx/yyy' is a SVN approach, where all branches/tags are "emulated" as directory.
You don't need them with Git. Two branches (one 'linux', one 'windows') are enough; then you can clone your repo twice, once in a 'windows' directory, one in a 'linux' directory.

关于一个可能的解决方案:

如果linux和windows平台之间有关eclipse的唯一区别是实际上,我建议您仅仅使用一个回购(对于您的来源),具有前面提到的那样, .classpath 两个分支,每个包括源和eclipse文件(为每个平台量身定制)。

Regarding a possible solution:
If the only difference between the linux and the windows platform, regarding eclipse, are the .project and .classpath files, I would actually recommend having only one repo (for your sources), with aforementioned two branches, each one including the sources and the eclipse files (tailored for each platform).

这样,解决方案更容易维护:一个repo,一个结构。两个分支。

That way, the solution is much easier to maintain: one repo, one structure. Two branches.

这篇关于Eclipse参考目录在eclipse项目目录之外,但在存储库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆