Where in an Eclipse workspace is the list of proje

2019-01-08 04:42发布

问题:

I use Eclipse with "external" projects - i.e. projects created from existing source.

Poking around in the workspace files, I cannot find any reference to these projects. My question is: how does Eclipse keep track of these projects?

I'd like to be able to add such a project to the workspace automatically (by generating .project and .classpath files).

回答1:

Windows:

<workspace>\.metadata\.plugins\org.eclipse.core.resources\.projects\

Linux / osx:

<workspace>/.metadata/.plugins/org.eclipse.core.resources/.projects/

Your project can exist outside the workspace, but all Eclipse-specific metadata are stored in that org.eclipse.core.resources\.projects directory



回答2:

In Mac OS X, it is under

<workspace>/.metadata/.plugins/org.eclipse.core.resources/.projects


回答3:

In Eclipse 3.3:

It's installed under your Eclipse workspace. Something like:

.metadata\.plugins\org.eclipse.core.resources\.projects\

within your workspace folder.

Under that folder is one folder per project. There's a file in there called .location, but it's binary.

So it looks like you can't do what you want, without interacting w/ Eclipse programmatically.



回答4:

If you are using Perforce (imported the project as a Perforce project), then .cproject and .project will be located under the root of the PERFORCE project, not on the workspace folder.

Hope this helps :)



回答5:

You can also have several workspaces - so you can connect to one and have set "A" of projects - and then connect to a different set when ever you like.



回答6:

In Linux after deleting

<workspace>\.metadata\.plugins\org.eclipse.core.resources\.projects\

Does not worked.

After that i have done File->Refresh

Then it cleared all old project listed from eclipse.