I am experiencing problems creating SVN projects from Eclipse (they
appear as non-Java projects, but that is another subject). While
trying to find the differences between the various methods for project
creation, I realized that I don't understand well how Eclipse stores
the association that such project is in such workspace.
As I understand it, the project's properties are stored in a file
called .project (and various other add-ons, such
as .classpath, .checkstyle,...) under the project's root folder. I
also found out that varipus plugins will store their project-related
settings into plugin-specific folders under the .metadata folder,
which I think is the location of all workspace information.
However, I couldn't find where (presumably in that .metadata folder)
are stored the information that "this workspace contains Project X
(whose settings are under the project's folder /whatever/ProjectX),
and also Project Y (with project folder: /somewhereesle/ProjectY),...
Does someone know where these association info are stored?
Of course I have several workspaces (one per SVN branch) and lots more
projects.
Thanks in advance.
J.
OK, that was a non-issue: the developper simply omitted to commit
its .project files!
Still, I am quite interested in the technical questions as to how
Eclipse does store Workspace/projectpath association.
Eclipse stores the workspace in <eclipse-home>\configuration\settings
\org.eclipse.ui.ide.prefs file. For each project in workspace Eclipse
creates folder for project and in it creates a file named '.project'.
In these file was stored project name, natures, builders, etc. There
is no ther specific place where Eclipse keeps information about
projects and workspaces, just in .project files under first sub-folder
of workspace folder.
HTH.
Regards,
Tanyu
On Sep 24, 1:35 pm, Jethrie-JDuprez in the news <Jeth...@gmail.com>
wrote:
Hello, and thank you for taking the time. However this is not correct
(or merely, not general enough).
Projects do not have to live under the workspace' folder (the one
which contains the ".metadata").
For example you can have the workspace under /home/login/
documentAndSettings/MyWorkspace, and the projects source under /home/
dev-Projects/...
For some reason this is the organisation recommended by my
organization: the idea is probably that the projects "sources" (.java,
Ant file, and projects settings .project, .checkstyle,...) are all
under control of the Configuration Management System, whereas the
workspace is specific to each developper (some of them not working on
all the Eclipse projects).
So in the logical view (in the IDE GUI), the workspace contains
projects, but the workspace folder does not necessarily contains
project sources in subfloders.
Indeed some metadata file in the workspace folder specifies the path
to each project folder.
I think I found the relevant files, theses are ".location" files,
which are found under <workspacefolder>/.metadata/.plugins/
org.eclipse.core.resources/<projectName>. They appear to be binary
files, so I wouldn't try to edit them.
As posted before, I solved my probelm of SVN project creation.
However, I also had in mind that I could script the creation of
workspaces and projects (I really have lots of branches, workspaces,
and projects).
The fact that something as essential as thelocation of project root
folders is stored in a binary file ruins my hopes that I can safely
script this.
Do you know if the format of these files is documented?
Brgds,
J.