如何通过命令提示符在eclipse中导入首选项(.epf)? [英] How to Import Preferences (.epf) in eclipse via command prompt?
本文介绍了如何通过命令提示符在eclipse中导入首选项(.epf)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想运行一个bat文件,它可以从一个位置(手动导出)导入首选项。我搜索了 命令,该命令将导入首选项 ,但找不到任何。
I wanted to run a bat file in which it can import preferences from a location (which was exported manually). I searched for the command which would import preferences but, could not find any.
推荐答案
没有现成的代码可以执行此操作。您必须编写一个Eclipse无头应用程序,它执行以下操作:
There is no existing code to do this. You would have to write an Eclipse headless application that does something like this:
IPreferencesService service = Platform.getPreferencesService();
IExportedPreferences prefs = service.readPreferences(file input stream);
// TODO create IPreferenceFilter array to filter what you want
service.applyPreferences(prefs, filter array);
查看导入首选项页面的来源 org.eclipse.ui.internal .wizards.preferences.WizardPreferencesImportPage1
以获取示例。
See the source of the import preferences page org.eclipse.ui.internal.wizards.preferences.WizardPreferencesImportPage1
for an example.
这篇关于如何通过命令提示符在eclipse中导入首选项(.epf)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文