我应该定期从 Eclipse 工作区中删除 .metadata 文件夹吗?会带来什么问题? [英] Should I regularly delete the .metadata folder from the Eclipse workspace? What problems will it cause?

查看:71
本文介绍了我应该定期从 Eclipse 工作区中删除 .metadata 文件夹吗?会带来什么问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的 Eclipse 工作区中,我注意到 .metadata 文件夹不断增长.我应该定期删除这个文件夹吗?会有什么后果?

In my Eclipse workspace I've noticed the .metadata folder keeps growing. Should I regularly delete this folder? What would be the consequences of it?

除此之外,.metadata 文件夹还包含哪些信息?

Apart from that, what information does the .metadata folder contain?

推荐答案

删除 all .metadata 文件夹将删除所有 项目参考来自您的工作区.

Deleting all the .metadata folder would remove all your project references from your workspace.

如果您的项目实际上完全存储在工作区中(即其源存储在默认工作区路径中),您也会丢失项目内容 - 更糟糕的是,您将无法重新导入他们.

If your project is actually stored completely in the workspace (i.e. its sources are stored in the default workspace path), you would also lose your project contents as well - which is worse since you wouldn't be able to re-import them.

我始终建议您将 Eclipse 项目及其源代码与工作区分开.
请参阅什么是 Eclipse 创建的src"目录?​​.
这样,特定于您的项目的设置将保存在您的项目中(
.settings 目录),而不是工作区.
此外,您还需要 在项目中移动启动器定义.

I always recommend to keep your Eclipse project and its sources separate from the workspace.
See "What is "src" directory created by Eclipse?".
That way, the settings specific to your projects are saved within your project (in the .settings directory), and not in the workspace.
Also, you need to move your launcher definitions in your project as well.

在该配置中,您可以删除工作区而不会造成太大损坏,只需将项目重新导入新工作区即可.

In that configuration, you can delete a workspace without much damage and simply re-import your project into a new workspace.

这篇关于我应该定期从 Eclipse 工作区中删除 .metadata 文件夹吗?会带来什么问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆