Sergey
Sergey

Reputation: 12427

Relationship between things I see in Eclipse and files/directories on disk

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:

Upvotes: 0

Views: 296

Answers (2)

randomuser
randomuser

Reputation: 603

This could help you (import > general > File system)

http://help.eclipse.org/helios/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Freference%2Fref-70.htm

Upvotes: 0

haylem
haylem

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?

  • F5 for refresh while selecting a project, folder or package.
  • enabling "refresh on access" if you have at least a 3.7 Eclipse version
  • re-importing a project, if some of the resources are not listed as being part of it

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

Related Questions