Reputation: 12427
I'm having some conceptual difficulties understanding how Eclipse works.
I've got a project for an Android application, which I created using the ADT wizard. Things I see in the Projects panel in Eclipse more or less resemble the contents of the filesystem directory which was generated in ~/workspaces/MyProjectName
, so I suppose that what I see in Eclipse is more or less a reflection of the filesystem.
Now I want to add some subproject/library which I checked out from github (as a git submodule) into a sub-directory inside ~/workspaces/MyProjectName
. I also edited classpath.xml
to point to the new location, hoping that Eclipse will read the file, see the new location and everything will work.
However, this didn't happen, the directory never appeared in Eclipse and Eclipse tried to pretend that it doesn't exist at all (i.e. not allowing me to build the project which referenced the code from the new directory etc.)
I tried to add the directory to the folder manually inside the project, but Eclipse complained that the directory already exists in the filesystem so it created nothing.
Obviously I'm doing something wrong :)
The questions are:
Am I supposed to do everything via Eclipse, including file operations, working with VCS etc.? I'm fairly proficient with terminal and would not want to have to figure out how to do everything via a point-and-click interface.
Is there a sane way to make Eclipse to re-read the project structure from the disk?
Where does Eclipse store its settings for each project? I was hoping to be able to make the project self-contained, so I can check it out on any machine and be able to work without having to manually re-configure stuff in Eclipse, but that would not work if Eclipse stores its configuration for the project somewhere outside the project's directory.
Upvotes: 0
Views: 296
Reputation: 22673
Am I supposed to do everything via Eclipse
No. You can, but nothing forces you to.
Is there a sane way to make Eclipse to re-read the project structure from the disk?
Where does Eclipse store its settings for each project?
The .project
file that is located on the filesystem in the project's root folder.
But that's not the configuration for editors, views and so on. That's the workspace configuration, which is stored on the filesytem in the .metadata
folder at the root of your workspace.
I'm not sure that you're not confusing some concepts in Eclipse, and that my answer actually addresses what you meant.
You can also import projects from existing projects or from filesystem, and you can also import a backed-up configuration if you do not wish to manually reset your configuration every time you create a new workspace.
Regarding VCS and things, you can either install a plugin (which VCS do you use?) or do things from the command-line or external tools. Many people for instance would use an Eclipse plugin for Subversion (usually subclipse or subversive) or use the command-line external or the TortoiseSVN extensions for the Windows shell.
Upvotes: 3