Can my Eclipse plugin change preferences from other plugins?

江枫思渺然 提交于 2020-01-21 05:45:08

问题


I'm working on an Eclipse plugin that needs to change some preferences defined by other plugins, e.g. the tab size in text editors. Is that possible?


回答1:


Yes, it is possible.

You'll need this in your preference page:

setPreferenceStore( new ScopedPreferenceStore( new InstanceScope(), "bundle-name-of-other-plugin" ) );

Or you could do something like this here.

FYI, the preferences live here:

pathToWorkspace\.metadata\.plugins\org.eclipse.core.runtime\.settings


来源:https://stackoverflow.com/questions/4587572/can-my-eclipse-plugin-change-preferences-from-other-plugins

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!