[英]set the property value for eclipse preference page
There is a property "show line number" in (windows->preferences->editor->text editor) eclipse which i want to tick by java code. 在(windows-> preferences-> editor-> text editor) eclipse中有一个属性“ show line number” ,我想通过Java代码进行勾选。 so how i fetch the key of that property and set the value in preference page.
所以我如何获取该属性的键并在首选项页面中设置值。
Note: I need to set the "show line number" option by default true. 注意:默认情况下,我需要将“显示行号”选项设置为true。
this will be correct solution for requirement: 这将是满足要求的正确解决方案:
String lineNumbers = AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER; 字符串lineNumbers = AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER; EditorsUI.getPreferenceStore().setValue(lineNumbers, true);
EditorsUI.getPreferenceStore()。setValue(lineNumbers,true);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.