eclipse的项目和配置文件 .project .cproject .classpath .metadata
eclipse CDT建立project后在project name对应的目录下面会生成.project和.cproject两个隐藏文件。
eclipse java建立project后在project name对应的目录下面会生成.project和.classpath两个隐藏文件。
.project文件大小2~3K Bytes , 该文件是针对eclipse的project Description ,
.cproject文件大小是10~12K Bytes,该文件是针对CDT插件的project Description ,
.classpath文件大小有1~3 M Bytes , 该文件是针对java插件的project Description,
.project和 .cproject , .classpath都是XML文件格式。
.project和 .cproject , .classpath 存在于project name对应的目录下,
.metadata是一个隐藏文件夹,它存在于eclipse第一次启动时指定的workspace目录下,
project name 和 workspace 分别对应的目录不能是同一个目录,否则无法建立project name。
当把project name( project name实际上就是直接产生.project) 建立在已存在source code 的目录时,
即表示该project name代表的project自动包含该目录下的所有source code。
eclipse cdt 的索引数据库文件名后缀是.pdom ,保存在.metadata/.plugins/org.eclipse.cdt.core目录下,
比如kernel_0715.1316773656364.pdom , uboot-0715.1316772863625.pdom ,其大小很可观,从几十M 到几百M ,甚至1G Bytes。
索引数据库文件名格式一般是 [Project-Name].[Random-Number].pdom。
eclipse java 的index 数据库在.metadata/.plugins/org.eclipse.jdt.core目录下,和eclipse cdt不同,这个目录下索引文件太多了。
对一个 Workspace 配置的备份其实就是备份 Workspace 的配置目录 .metadata。
eclipse-java 在Project > Properties > Java Build Path > source下增减项目中的文件夹
今天下午遇到一个问题,Eclipse在某一个Workspace上启动CPU占用率就会是100%,
我怀疑是前两天反编译生成的一个源代码工程错误太多导致,
所以想在workspace里找到工程的配置文件然后把它删除。 经过一番尝试后发现它存在:
d:\workspace\.metadata\.plugins\org.eclipse.core.resources\.projects
下面。 把想要去掉的工程在这里面删除就可以了,这样workspace又可以正常启动了。
昨天重装下机器,由于Eclipse里面的设置让我改的乱七八糟。提示功能没有了,快捷键也给改错了(可以使用,使用后必须按下方向键向左箭头),而我又不知道怎么把他改回来。
重装系统后,安装Eclipse,然后按照找来的文章改快捷键,发现快捷键已经被改过了?!!!!Why?思考过后,发现,除了每次装Eclipse后第一次开启Eclipse时指定的文件夹一样外,其他都不一样,那好,就在那个文件夹找原因。不管是学校还是家里,Eclipse指定文件夹内肯定会有一个.metadata文件夹,那可能就是我想找到的原因。把这个文件夹里所有内容删掉(先关Eclipse),然后再重新启动Eclipse后发现,所有配置都被还原成默认,Eclipse中项目表也没有任何项目,哈,看来Eclipse内所有改动都放在这个文件夹。又学了一手,按照上一篇文章修改快捷键后,运行正常。OK。
以后Eclipse再有问题,可以直接把.metadata文件夹删除了,在进行修改。回来再研究研究这个文件夹保存的一些相关文件都是什么。
Eclipse:如何在不同的 workspace 使用相同設定
在 Eclipse 中我們可以透過切換 workspace 來區分不同的工作,
但又只保留一份 Eclipse 的程式以節省空間。
不過也因為 workspace 的設定檔是分開的,
所以當我們新增一個workspace時,常常會發現字型、排版等也都跑掉了,
如果要一一重設非常麻煩,那麼要怎麼樣才能在不同的 workspace 使用相同設定呢?
請見以下流程。
步驟很簡單,條列如下:
- 關掉 Eclipse
- 找到舊的 workspace 的設定檔資料夾,路徑在:${old_workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings
- 複製整個資料夾,在新的 workspace 貼上並覆蓋,路徑在:${new_workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings
- 啟動 Eclipse 並切換至新 workspace,設定是不是都回來了呢?
Sharing eclipse specific settings across workspaces:
- Go t
${old_workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings - Copy everything under the above directory to
${new_workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings
This is going to make sure that the ${new_workspace} is having the same configuration as the ${old_workspace}
Hope this helps. Update in case of any issues.
Another option is export/import:
- From your existing workspace,
File->Export...->General->Preferences, check Export all, and choose file to save them to (prefs.epf for example) - Startup Eclipse in a new workspace,
File->Import...->General->Preferences, choose your file (prefs.epf), check import all
That worked great for the original author of this tip: he had his code formatting, code style, svn repos, jres preferences imported.
Edit: On Eclipse Juno this works poorly. Some preferences silently do not carry over such as save actions.
Clean out Eclipse workspace metadata
http://stackoverflow.com/questions/11768106/clean-out-eclipse-workspace-metadata
There is no easy way to remove the "outdated" stuff from an existing workspace.
Using the "clean" parameter will not really help, as many of the files you refer to are "free form data",
only known to the plugins that are no longer available.
Your best bet is to optimize the re-import, where I would like to point out the following:
- When creating a new workspace, you can already choose to have some settings being copied from the current to the new workspace.
- You can export the preferences of the current workspace (using the Export menu) and re-import them in the new workspace.
- There are lots of recommendations on the Internet to just copy the
${old_workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settingsfolder from the old to the new workspace.
This is surely the fastest way, but it may lead to weird behaviour, because some of your plugins may depend on these settings
and on some of the mentioned "free form data" stored elsewhere.
(There are even people symlinking these folders over multiple workspaces, but this really requires to use the same plugins on all workspaces.) - You may want to consider using more project specific settings than workspace preferences in the future.
So for instance all the Java compiler settings can either be set on the workspace level or on the project level.
If set on the project level, you can put them under version control and are independent of the workspace.
eclipse的项目和配置文件 .project .cproject .classpath .metadata的更多相关文章
- ubuntu下eclipse新建项目没有java project的解决办法
装好了eclipse之后却发现新建项目没有java project的选项,大致搜索了一下,并没有发现很好的解决方案(大都是让你重新安装什么的),于是开始瞎鼓捣,并且找到了一个方案: 在终端切换到roo ...
- Eclipse - Maven项目Update Project后jdk版本变成1.5
问题与分析 最近遇到个奇怪的问题,在Eclipse里对一个Maven项目进行Update Project(快捷键是 Alt+F5),原本jdk为1.8的项目忽然就变成了1.5,于是就报了一些错误. 我 ...
- eclipse .project文件 .classpath文件的作用
.classpath文件的作用 可以参考.classpath文件的作用 .project文件的作用 确保你自己的eclipse能创建Java项目,并且正确编译运行helloworld,给eclipse ...
- Android开发中遇到的问题(五)——Eclipse导入Android项目出现"Invalid project description overlaps the location of another project"错误的解决办法
一.错误描述 使用如下的命令手动创建一个Android项目 android create project -n LinearLayoutTest -t -p E:/Android/workspace/ ...
- 微信小游戏 项目配置文件 project.config.json
一.项目配置文件project.config.json 小程序开发者工具在每个项目的根目录都会生成一个 project.config.json,在工具上做的任何配置都会写入到这个文件,当重新安装工具或 ...
- 遇到问题----java----myeclipse或者eclipse发布的项目时配置文件不更新或者无配置文件
myeclipse或者eclipse发布的项目时配置文件不更新或者无配置文件. 正常的web项目有目录 src/main/resources 和 src/main/java 这两个目录默认在编译发布时 ...
- Eclipse打war包方法以及Eclipse移植项目时JDK版本不匹配Project facet Java version 1.7 is not supported
打包时: 在项目上右键选择Export,如图: 然后选择WAR file,如图所示.接着再:其中web projecct为打出来包的名字, Destination,打包后存的位置,点击Browse.. ...
- Eclipse移植项目时JDK版本不匹配Project facet Java version 1.7 is not supported
Eclipse移植项目时JDK版本不匹配Project facet Java version 1.7 is not supported 如果原有项目用的为JDK1.7,而自己的是低版本JDK,比如1. ...
- 关于eclipse项目右键没有project facets的解决方法遇到的问题
[ 关于eclipse项目右键没有project facets的解决方法] [创建maven项目生成WebRoot目录,web.xml文件,以及修改编译路径classess的解决办法,以及解决找不到或 ...
随机推荐
- Nim 游戏、SG 函数、游戏的和
Nim游戏 Nim游戏定义 Nim游戏是组合游戏(Combinatorial Games)的一种,准确来说,属于“Impartial Combinatorial Games”(以下简称ICG).满足以 ...
- 用dom4j操作xml文件
XML的全称是eXtensible Markup Language,即“可扩展标记语言”.XML文件的作用主要是数据存储,文件配置,数据传输. html与xml的区别是:①html语法松散,xml语法 ...
- bash: composer: command not found
下载composer到本地:curl -sS https://getcomposer.org/installer | php 移动至系统服务:sudo mv composer.phar /usr/bi ...
- css如何将div画成三角形
首先了解一下盒模型: 盒模型 先看一段代码: #div1{ height: 100px; border-style: solid; border-width: 100px 100px 100px 10 ...
- HDU 4725 The Shortest Path in Nya Graph(spfa+虚拟点建图)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4725 题目大意:有n层,n个点分布在这些层上,相邻层的点是可以联通的且距离为c,还有额外给出了m个条边 ...
- Spring Boot Admin Quick Start
Quick Start 1. Spring Boot Admin是干什么的? 用来监控Spring Boot项目,可以通过Spring Boot Admin Client(via Http) 或者 使 ...
- [Spring Data JPA问题]Executing an update/delete query; nested exception is javax.persistence.TransactionRequiredException
JPQL如下: @Modifying(clearAutomatically = true) @Query("UPDATE SyncTestFromTKDO SET stuAns = '' w ...
- LoadRunner学习笔记log函数
lr_log_message 只是记会写到本地vuser的log里面. lr_message和lr_output_message基本相同,它们会同时写到vuser的log和发送到controller里 ...
- thinkphp5.0自动加载
概述 ThinkPHP5.0 真正实现了按需加载,所有类库采用自动加载机制,并且支持类库映射和composer类库的自动加载. 自动加载的实现由think\Loader类库完成,自动加载规范符合PHP ...
- 【面试总结-编程】多行两列数据,实现同key的value求和并输出
一个文件,两列,多行. 第一列是字母,第二列是数字,同列数据之间通过空格分割. 统计首列字母相同的第二列之和. 样例输入: A 5 B 6 OO 7 A 6 A 2 OO 2 输出: A:13 B:6 ...