删除 eclipse 工作区中的 .metadata 文件夹可以吗?

1.2*_*tts 1 eclipse flash-builder

我运行了磁盘清单,因为空间不足,我发现 Eclipse (Flash Builder) 工作区中的 .metadata 文件夹大小为 1GB。我在工作区中可能使用了许多项目中的 4 个。我想如果我删除它,我将不得不将项目重新导入到工作区或新的工作区中。我应该怎么办?

Jon*_*ham 5

.metadata 是工作区设置存储位置。因此,如果您删除它,那么您所有的首选项、缓存、工作区中的项目等都将丢失。

(扩展之前的答案)。

是的,继续删除.metadata。一旦您重新导入您拥有的项目、配置您的目标并允许所有索引器运行,您可能会发现您的 .metadata 又恢复到相同的大小。

不会导致完全重新增长的少数事情之一是您将放弃每个文件的本地历史记录。这可能会节省几个百分点。

在我当前的工作区之一上,.metadata 大致如下所示(仅显示大型使用文件夹):

.metadata <- 524 MB
  .plugins <- 523 MB (this is where individual plug-ins save there persisted states)
    org.eclipse.pde.core/.bundle_pool <- 335 MB (these are the plug-ins that are part of my target platform)
    org.eclipse.jdt.core <- 67 MB (this is the indexes of my Java files)
    org.eclipse.epp.logging.aeri.ui <- 30 MB (this is the Automatic Error reporting local cache of remote database)
    org.eclipse.core.resources/.history <- 12.4 MB (this is the local history) 
Run Code Online (Sandbox Code Playgroud)

提出一个不同的问题可能会很有用(例如,为什么工作区/.metadata 中的 foo/bar 路径占用这么多空间?),因为这可能是一个简单的配置更改,但会对您的磁盘使用产生很大影响。