码迷,mamicode.com
首页 > 系统相关 > 详细

eclipse preference plugin development store and get

时间:2014-09-29 00:30:07      阅读:223      评论:0      收藏:0      [点我收藏+]

标签:des   style   blog   http   color   io   ar   for   文件   

eclipse plugin development:

 

E:\workspaces\Eclipse_workspace_rcp\.metadata\.plugins\org.eclipse.pde.core\Eclipse Application

 

set the preferencestore in where:

setPreferenceStore(Activator.getDefault().getPreferenceStore());

 

 

 

http://blog.csdn.net/jimesum1/article/details/2413010

 

http://www.cnblogs.com/decarl/archive/2012/05/15/2502084.html

 

设置的值会保存到
runtime-myDesigner.product\.metadata\.plugins\org.eclipse.core.runtime\.settings中会生成文件

E:\workspaces\runtime-EclipseApplication\.metadata\.plugins\org.eclipse.core.runtime\.settings\com.geee.cucumber.pref

 

BEST DOCUMENT:

http://demo.netfoucs.com/luoww1/article/details/34425305

//将用户引导至首选项配置页面         
PreferenceManager manager = PlatformUI.getWorkbench().getPreferenceManager();          
Shell parentShell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();          
PreferenceDialog pd = new PreferenceDialog(parentShell, manager);        
pd.setSelectedNode("com.workflow.preferences.page.DBPreferencePage");
//设置选中的页面  (org.eclipse.ui.preferencePages 扩展点中page的ID)       
 pd.open();  



PreferencesUtil.createPreferenceDialogOn(
new Shell(),
"com.workflow.preferences.page.DBPreferencePage", 
new String[]{"com.workflow.preferences.page.WorkFlowBasePreferencePage","com.workflow.preferences.page.DBPreferencePage"}, null).open(); 

//上面的new string 数组参数主要定义左边显示哪些首页项节点栏,若为null,就显示所有的所选项

 

  1. preference for plugin store in this place for every store key:

E:\workspaces\runtime-EclipseApplication\.metadata\.plugins\org.eclipse.core.runtime\.settings\

like below:

choicePreference=choice1
eclipse.preferences.version=1
stringPreference=3333333333

 

2. then we set the default store value .

3.createContent should  set these stored value

4.performOK and performApply to set the value.

eclipse preference plugin development store and get

标签:des   style   blog   http   color   io   ar   for   文件   

原文地址:http://www.cnblogs.com/alterhu/p/3999205.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!