eclipse preference plugin development store and get

比眉伴天荒 2021-12-21 23:07 230阅读 0赞

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());

eclipse build

假设你的插件已经开发完毕,剩下打包了,请在此之前确认以下事项;

程序中需要加入的第三方Jar包,不能自己在 Build Path 中手动加入, 必须使用下面的方法.
其他的第三方 Jar 包 (包括 Classpath) Runtime -> Classpath -> Add(New)

c493d3d8-1c69-3068-bf5e-359b60de02ea.jpg

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

image

BEST DOCUMENT:

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

image

  1. //将用户引导至首选项配置页面
  2. PreferenceManager manager = PlatformUI.getWorkbench().getPreferenceManager();
  3. Shell parentShell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
  4. PreferenceDialog pd = new PreferenceDialog(parentShell, manager);
  5. pd.setSelectedNode("com.workflow.preferences.page.DBPreferencePage");
  6. //设置选中的页面 (org.eclipse.ui.preferencePages 扩展点中page的ID)
  7. pd.open();
  8. PreferencesUtil.createPreferenceDialogOn(
  9. new Shell(),
  10. "com.workflow.preferences.page.DBPreferencePage",
  11. new String[]{"com.workflow.preferences.page.WorkFlowBasePreferencePage","com.workflow.preferences.page.DBPreferencePage"}, null).open();
  12. //上面的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:

  1. choicePreference=choice1
  2. eclipse.preferences.version=1
  3. stringPreference=3333333333
  1. then we set the default store value .

3.createContent should set these stored value

4.performOK and performApply to set the value.

转载于:https://www.cnblogs.com/alterhu/p/3999205.html

发表评论

表情:
评论列表 (有 0 条评论,230人围观)

还没有评论,来说两句吧...

相关阅读

    相关 Eclipse Plugin Install

    1. “帮助”->“软件更新”->“查找并安装”->“搜索要安装的新功能部件”->“新建远程站点”(此种方式用于在线更新) 2. “帮助”->“软件更新”->“查找并安装”-