Best practices: sharing files between projects in Eclipse

I am using Eclipse (Helios 3.6.2) and Android SDK.

Is there a way to accomplish this without using symlinks?

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) 

I am a curious newbie to Eclipse. In VisualStudio, I can do this by adding files by reference. I could not find something like this in Eclipse.

+4
source share
1 answer

You can make a link to the project, but I do not think that this is exactly what you are looking for. So here is a brief explanation: You must have a Customer 1 Project and a Template Project in your workspace. Then right-click on Customer 1 Project in the Package Explorer and select Build Path -> Configure Build Path... Go to the Projects tab and select Add... Here select Template Project .

This solution can lead to a problem if B.java from Customer 1 Project and Template Project are in the same package (which probably is). Therefore, you need to choose a different name for this class.

+2
source

Source: https://habr.com/ru/post/1382890/


All Articles