导出Eclipse XML格式规则? [英] Export the Eclipse XML Formatting Rules?

查看:197
本文介绍了导出Eclipse XML格式规则?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法导出 Window>中定义的设置。首选项对话框 XML> XML文件> Eclipse 3.5 Galileo(Java EE Package)中的编辑器? Eclipse在哪里存储这些设置?

Is there a way to export the settings defined in Window > Preferences Dialog under XML > XML Files > Editor in Eclipse 3.5 Galileo (Java EE Package)? And where do Eclipse stores these settings?

现在我有一个 eclipse_xml_format.epf ,其中包含以下内容

Now i got an eclipse_xml_format.epf with the following content

/instance/org.eclipse.wst.xml.core/lineWidth=120
/instance/org.eclipse.wst.xml.core/indentationChar=space
/instance/org.eclipse.wst.xml.core/indentationSize=4

但是我无法导入这个文件!

But i can't import this file!

推荐答案

记录这些XML设置的文件是: p>

The file recording those XML settings is:

<workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.wst.xml.core.prefs

那就是:


  • org.eclipse.wst.xml.core.prefs
  • $在您的工作区 org.eclipse.core.runtime\.settings directorty
  • 中的b $ b

  • org.eclipse.wst.xml.core.prefs,
  • in the org.eclipse.core.runtime\.settings directorty
  • of your workspace

所以即使你不能直接导出,你至少可以复制/合并在另一个工作区设置文件的文件中,重新导入XML设置;

So even if you cannot export them directly, you can at least copy/merge that file with another workspace setting file, re-importing that way the XML settings;

就是说,如果你导出您所有的偏好,都保存在您选择的.epf文件中。

That being said, if you export all your preferences, they are saved in an .epf file of your choice.

所有以 /instance/org.eclipse.wst.xml.core开头的行是有趣的:

/instance/org.eclipse.wst.xml.core/indentationChar=space

所以你可以删除所有其他行,然后重新导入只有XML的epf文件

So you can remove all the other lines, and then re-import this epf files with only the XML settings in it.

注意:对于您的清除导出文件要重新导入(至少与eclipse3.5),它必须包含行 file_export_version = 3.0 .epf 文件中的任何地方)。

Note: for your "cleaned" export file to be reimported (at least with eclipse3.5), it ust contain the line file_export_version=3.0 (anywhere in the .epf file).

#Thu Mar 11 13:33:16 CET 2010
/instance/org.eclipse.wst.xml.core/lineWidth=119
/instance/org.eclipse.wst.xml.core/indentationChar=space
/instance/org.eclipse.wst.xml.core/indentationSize=4
file_export_version=3.0

将重新导入成功

这篇关于导出Eclipse XML格式规则?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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