1.Action ID 获取
IViewPart homeworkView = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("org.xcc.zzu_wmp.views.HomeWorkView");
IActionBars bars = homeworkView.getViewSite().getActionBars();
IToolBarManager actios = bars.getToolBarManager();
ActionContributionItem contribut = (ActionContributionItem)
actios.find(PreferenceConstants.P_ZZU_REFRESH);
contribut.getAction().setEnabled(true);
refresh = new Action( {});
refresh.setEnabled(false);
refresh.setId(PreferenceConstants.P_ZZU_REFRESH);
2. ActionSet ID 获取
IWorkbench wb=PlatformUI.getWorkbench();
List<String> actionIDs= new ArrayList<String>();
actionIDs.add(PreferenceConstants.P_ZZU_SAVE);
actionIDs.add(PreferenceConstants.P_ZZU_DOWNLOAD);
actionIDs.add(PreferenceConstants.P_ZZU_UPLOAD);
ActionPresentation ap = ((WorkbenchWindow) wb.getActiveWorkbenchWindow()) .getActionPresentation();
IActionSet[] sets = ap.getActionSets();
if (sets != null) {
for (IActionSet set : sets) {
PluginActionSet pas = (PluginActionSet) set;
IAction[] actions = pas.getPluginActions();
if (actions != null&& pas.getDesc().getId().endsWith(PreferenceConstants.P_ZZU_ACTIONSET)) {//ActionSetID
for (IAction action : actions) {
if (actionIDs.contains(action.getId())) {
action.setEnabled(store.getBoolean(PreferenceConstants.P_ZZU_ISLOGIN));
}
}
}
}
}
分享到:
相关推荐
ubuntu_eclpse-c++_and_java交叉编译环境搭建
这是一个用JAVA编写的文本编辑器,主要实现了部分简单常用的功能.(并且能够实现界面风格的转换). 运行此程序时必须本机中要安装JDK
eclpse反编译
Eclipse快捷键大全,方便操作eclpse,提高开发效率,方便用户使用
eclpse插件tomcatPlugin
google plugin for eclipse 4.3,不容易下载下来。
Eclipse RCP 应用系统开发 ppt
hadoop-eclipse-plugin-2.2.0插件 windows/linux用的eclpse插件 支持hadoop-2.2.0
eclpse pleiades(002)
eclpse pleiades 2022.03 日文版 日本语eclipse版本 因为很大 分为了4份
eclpse pleiades(004) 日语版
eclpse pleiades(003) 日语版
eclpse+cdt+mingw+msys安装文档.包括ffmpeg的编译的详细步骤
PMC出品的eclipse下进行t-engine开发的插件,应该是目前比较好的免费t-engine开发环境解决方案。此文档为其安装配置指南。
cppcheck是C/C++语言的静态检查工具,不同于语法检查,他主要模拟编译器的规则实现静态检查,1、安装cppcheck,自己官方下吧 ,2、将插件复制到Eclipse CDT安装目录的plugin文件夹,3、启动Eclipse,window-...
eclipse_3.2.2反编译插件
2.将net.sf.jadclipse_3.3.0.jar放到安装eclpse的plugins目录不上 D:\xxx\xxx\eclipse\plugins 3.在Eclipse的Windows——> Perference——>General->Editors->File Associations中修改“*.class”默认关联的编辑器为...
eclpse工作区
通过导入此文件模板,让Eclipse可以支持标签提示, 导入步骤:Eclipse -> Window -> Preferences -> Java -> Editor -> Templates -> Import -> templates.xml
下载直接把相应文件复制到eclipse 相应目录