eclipse preference plugin development store and get

简介:

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

复制代码
//将用户引导至首选项配置页面         
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.


本文转自hcy's workbench博客园博客,原文链接:http://www.cnblogs.com/alterhu/p/3999205.html,如需转载请自行联系原作者。


目录
相关文章
|
Java Maven Android开发
eclipse 中 maven的pom.xml文件发生错误:CoreException: Could not get the value for parameter compilerId for plugin execution default-compile: PluginResolutionException: Plugin org.apache.maven...
eclipse 中 maven的pom.xml文件发生错误:CoreException: Could not get the value for parameter compilerId for plugin execution default-compile: PluginResolutionException: Plugin org.apache.maven...
542 0
eclipse 中 maven的pom.xml文件发生错误:CoreException: Could not get the value for parameter compilerId for plugin execution default-compile: PluginResolutionException: Plugin org.apache.maven...
|
9月前
|
Java Android开发
eclipse去掉try-catch,构造方法,get,set方法等里面自动生成的注释
eclipse去掉try-catch,构造方法,get,set方法等里面自动生成的注释
68 0
|
Java Apache Maven
Eclipse创建maven项目时,出现Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources错
Eclipse创建maven项目时,出现Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources错
272 0
Eclipse创建maven项目时,出现Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources错
|
Android开发
Eclipse plugin folder
Eclipse plugin folder
Eclipse plugin folder
|
开发工具 Android开发 git
离线安装Eclipse的Color theme plugin
离线安装Eclipse的Color theme plugin
离线安装Eclipse的Color theme plugin
|
应用服务中间件 Android开发 数据安全/隐私保护
Eclipse中Tomcat实现表单Get和Post响应
前言: URL: 统一资源定位符。http://localhost:8080/day09/testImg.html。只能定位互联网资源。是URI的子集。 URI: 统一资源标记符。/day09/hello。
1713 0
|
Java Maven Android开发
eclipse maven 报错Could not get the value for parameter encoding for plugin execution default
问题描述:更改默认的maven仓库路径完成后、即存maven项目或者新建maven项目的时候出现如下错误   Could not get the value for parameter encoding for plugin execution default   原因分析:当问题解决后、回...
1802 1