最佳实践:在 Eclipse 中共享项目文件

4
我正在使用Eclipse(Helios 3.6.2)和Android SDK。
有没有不使用符号链接的方法来实现这一点?
Template Project: this is the "Main" Project. All other projects will derive from this. 
- src
  - A.java
  - B.java
- layout
  - j.xml
  - l.xml
- drawable
  - x.png
  - y.png


Customer 1 Project:
- src
  - A.java (from template)
  - B.java (not from template. custom file used only in this project)
- layout
  - j.xml  (from template)
  - l.xml  (not from template. custom file used only in this project)
- drawable
  - x.png  (from template)
  - y.png  (not from template. custom file used only in this project)


Customer 2 Project:
- src
  - A.java (from template)
  - B.java (from template)
- layout
  - j.xml  (from template)
  - l.xml  (from template)
- drawable
  - x.png  (not from template. custom file used only in this project)
  - y.png  (not from template. custom file used only in this project)


Customer "N" Project:
  and so on with many combinations of using/not using from template...
  (This is for illustration only. My real projects have hundreds of files of course)

我在Eclipse方面有点新手。在Visual Studio中,我可以通过添加引用文件来实现这一点。但是我在Eclipse中没有找到类似的东西。

1个回答

2
您可以创建项目引用,但我认为这不是您要寻找的确切方法。以下是简要说明: 您需要在当前工作区中有 Customer 1 ProjectTemplate Project。然后,在 Package Explorer 中右键单击 Customer 1 Project 并选择 Build Path -> Configure Build Path...。在此处转到 Projects 标签并选择 Add...。在此处选择您的 Template project
如果来自 Customer 1 ProjectTemplate ProjectB.java 在同一包中(很可能如此),则此解决方案可能会导致问题。因此,您必须为该类选择另一个名称。

那种方式不符合我的需求。无论如何感谢你。 - Christian

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接