首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

RCP中关于可选项(preferencePages)的施用

2012-10-24 
RCP中关于可选项(preferencePages)的使用?在plugin.xml中添加preferencePages的相关配置:自定义属性的配置

RCP中关于可选项(preferencePages)的使用

?在plugin.xml中添加preferencePages的相关配置:

自定义属性的配置:

?

public class SampleHandler extends AbstractHandler {    private static String CUSTOMPROPERTYPAGE = "com.vnvntrip.plugin.dev.properties.CustomPropertyPage";    /**     * The constructor.     */    public SampleHandler() {    }    /**     * the command has been executed, so extract extract the needed information     * from the application context.     */    public Object execute(ExecutionEvent event) throws ExecutionException {Shell shell = HandlerUtil.getActiveShell(event);// JfaceDialog dialog=new JfaceDialog(shell);// dialog.open();//WorkbenchPreferenceDialog.createDialogOn(shell, preferencePageId)WorkbenchPreferenceDialog dialog = WorkbenchPreferenceDialog.createDialogOn(shell, CUSTOMPROPERTYPAGE);dialog.showOnly(new String[] { CUSTOMPROPERTYPAGE });dialog.open();return null;    }}

?

?

?

?

?

1 楼 yanshanzhu 2011-01-05   WorkbenchPreferenceDialog dialog = WorkbenchPreferenceDialog 
       .createDialogOn(shell, CUSTOMPROPERTYPAGE); 
在eclipse 3.6 中限制访问 2 楼 C_J 2011-01-05   没看明白
你的com.vnvntrip.plugin.dev.preferences.CustomPreferencePage定义呢? 3 楼 longgangbai 2011-10-28   CustomPreferencePageC_J 写道没看明白
你的com.vnvntrip.plugin.dev.preferences.CustomPreferencePage定义呢?
CustomPreferencePage是实现PreferencePage的一个类而已 4 楼 longgangbai 2011-10-28   yanshanzhu 写道 WorkbenchPreferenceDialog dialog = WorkbenchPreferenceDialog 
       .createDialogOn(shell, CUSTOMPROPERTYPAGE); 
在eclipse 3.6 中限制访问
  我们当时开发的使用的这样写的,参照eclipse源代码写的当时没有关注这些,实在不好意思。

热点排行