(DM)如何隐藏Eclipse的菜单
来源:百度文库 编辑:神马文学网 时间:2024/05/01 19:35:40
问题:
想达到的目标是:在不同的状态下,显示不同的菜单(例如,不同用户登陆显示不同的菜单)。
解决方法:
在WorkbenchWindowAdvisor的postWindowOpen()中添加如下代码 :
public void postWindowOpen() {
IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
configurer.getWindow().getActivePage().hideActionSet("gef.tutorial.stepii.actionSet1");//IworkbenchPage.hideActionset();
}
IworkbenchPage.hideActionset(String actionSetID);这个方法有个参数是Actionset的ID,知道ID就可以隐藏了。
Actionset的ID :
point="org.eclipse.ui.actionSets">
id="gef.tutorial.stepii.actionSet1" // Actionset的ID
label="gef.tutorial.stepii.actionSet1"
visible="true">
class="gef.tutorial.stepii.actions.ActionSetTest"
id="gef.tutorial.stepii.action1"
label="action1"
menubarPath="gef.tutorial.stepii.menu1/aaa"
style="push"
toolbarPath="aaa"/>
想达到的目标是:在不同的状态下,显示不同的菜单(例如,不同用户登陆显示不同的菜单)。
解决方法:
在WorkbenchWindowAdvisor的postWindowOpen()中添加如下代码 :
public void postWindowOpen() {
IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
configurer.getWindow().getActivePage().hideActionSet("gef.tutorial.stepii.actionSet1");//IworkbenchPage.hideActionset();
}
IworkbenchPage.hideActionset(String actionSetID);这个方法有个参数是Actionset的ID,知道ID就可以隐藏了。
Actionset的ID :
label="gef.tutorial.stepii.actionSet1"
visible="true">
id="gef.tutorial.stepii.action1"
label="action1"
menubarPath="gef.tutorial.stepii.menu1/aaa"
style="push"
toolbarPath="aaa"/>
(DM)如何隐藏Eclipse的菜单
可以隐藏的菜单特效代码-bianceng.cn
(DM)在程序的任何的方法获取菜单栏 中国Eclipse社区 论坛
隐藏notes菜单
隐藏notes菜单
滑出式隐藏菜单样式
隐藏菜单效果
DM的用法
DM的使用方法
如何定制你的xoops菜单
如何显示隐藏的文件夹
关于DM如何与消费者沟通和得到反馈的方法
滑出式隐藏菜单样式 - 菜单特效 - 网页特效代码
DM万用版及图解和DM的基本使用
DM万用版及图解和DM的基本
DM硬盘分区教程 DM万用版及图解DM的基本使用方法
DM硬盘分区教程 DM万用版及图解DM的基本使用方法1
如何添加右键菜单?
Eclipse如何查看源代码
如何把ToolStripMenuItem的副本选入上下文菜单。。。?
如何添加鼠标右键菜单里的快捷图标
如何修改鼠标右键菜单多余的选项
如何去掉桌面右键菜单不想要的内容?
如何添加鼠标右键菜单里的快捷图标