How to find the preference key for a certain setting in the Preferences dialog

与世无争的帅哥 提交于 2019-12-11 04:42:23

问题


I need to set the value RSE UI to unchecked by default.

I just need to access this value programmatically but I cannot find it.

The value is located under Window > Preferences > General > Startup and shutdown.


回答1:


There is an Eclipse plug-in called Preferences Spy.

http://blog.vogella.com/2014/12/28/preferences-spy-for-eclipse-ide-and-rcp/

It adds a view that allows you to log all or certain preference changes. For each change, the affected preference node, the preference name, and the old and new value is shown.

At least for me, it helped to find the preference keys for certain settings.




回答2:


A simple brute force solution:

  1. create a full, deep copy of all your workspace settings files
  2. start Eclipse; and that property you are interested in manually and exit eclipse
  3. compare the new settings files with those in your copy

That should ideally tell you which settings file contains that property, and how it is named "programmatically".

With that knowledge, you can use any kind of text replacement tool (like sed) to simply update that settings file automatically later on.



来源:https://stackoverflow.com/questions/40845433/how-to-find-the-preference-key-for-a-certain-setting-in-the-preferences-dialog

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