项目列表存储在 Eclipse 工作区的何处?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/251116/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 18:30:41  来源:igfitidea点击:

Where in an Eclipse workspace is the list of projects stored?

eclipseproject

提问by Kris Pruden

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

我将 Eclipse 用于“外部”项目 - 即从现有源创建的项目。

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?

在工作区文件中四处寻找,我找不到对这些项目的任何引用。我的问题是:Eclipse 如何跟踪这些项目?

I'd like to be able to add such a project to the workspace automatically (by generating .projectand .classpathfiles).

我希望能够自动将这样的项目添加到工作区(通过生成.project.classpath文件)。

回答by VonC

Windows:

视窗:

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

Linux / osx:

Linux / osx:

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

Your project can exist outside the workspace, but all Eclipse-specific metadataare stored in that org.eclipse.core.resources\.projectsdirectory

您的项目可以存在于工作区之外,但所有 Eclipse 特定的metadata都存储在该org.eclipse.core.resources\.projects目录中

回答by Magne Land

In Mac OS X, it is under

在 Mac OS X 中,它位于

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

回答by Dave DiFranco

In Eclipse 3.3:

在 Eclipse 3.3 中:

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

它安装在您的 Eclipse 工作区下。就像是:

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

withinyour workspace folder.

您的工作区文件夹中。

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

该文件夹下是每个项目一个文件夹。那里有一个名为.location的文件,但它是二进制文件。

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

因此,如果不以编程方式与 Eclipse 交互,您就无法做您想做的事。

回答by Sebastian

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.

如果您使用的是 Perforce(将项目作为 Perforce 项目导入),那么 .cproject 和 .project 将位于 PERFORCE 项目的根目录下,而不是在工作区文件夹中。

Hope this helps :)

希望这可以帮助 :)

回答by Jeegar Patel

In Linux after deleting

在 Linux 中删除后

<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.

然后它清除了 eclipse 中列出的所有旧项目。

回答by silverbugg

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.

您还可以拥有多个工作区 - 因此您可以连接到一个并设置“A”项目 - 然后在您喜欢时连接到不同的组。