Posted on 2006-10-08 10:04
小小涼粉 閱讀(1245)
評論(1) 編輯 收藏
在IWorkbenchPreferenceConstants中有很多常量,用來配置preference settings,諸如:
OPEN_NEW_PERSPECTIVE——打開新視圖的方式
DOCK_PERSPECTIVE_BAR——鎖定PerspectiveBar的位置
INITIAL_FAST_VIEW_BAR_LOCATION——表示fast view bar在一個fresh workspace中鎖定的位置,This preference is meaningless after a workspace has been setup, since the fast view bar state is then persisted in the workbench
SHOW_TRADITIONAL_STYLE_TABS——表示是否在editor和view上顯示傳統的tab style
SHOW_PROGRESS_ON_STARTUP——是否在啟動時顯示progress
SHOW_TEXT_ON_PERSPECTIVE_BAR——是否在PerspectiveBar上顯示文字
等等......
更改的時候
在RCP中的plugin.xml里,使用preferenceCustomization屬性,例如:
CODE:
<extension
id="someproduct"
point="org.eclipse.core.runtime.products">
<product
? application="com.example.someproduct.application"
? name="Some Product">
? <property
??? name="preferenceCustomization"
??? value="plugin_customization.ini"/>
然后在ini文件中進行對應的設置
或者,PlatformUI.getPreferenceStore().setDefault(IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS,false);