切换到某个透视图隐藏菜单

xiaoxiao2021-03-01  51

切换到某个透视图隐藏菜单

在ApplicationActionBarAdvisor中添加:

configurer.getWindowConfigurer().getWindow().addPerspectiveListener(new IPerspectiveListener(){ public void perspectiveActivated(IWorkbenchPage page, IPerspectiveDescriptor perspective) { if(perspective.getId().equals(PERSPECTIVE_ID)){ configurer.getWindowConfigurer().setShowMenuBar(false); } else { configurer.getWindowConfigurer().setShowMenuBar(true); } } public void perspectiveChanged(IWorkbenchPage page, IPerspectiveDescriptor perspective, String changeId) { } });

 

转载请注明原文地址: https://www.6miu.com/read-3850208.html

最新回复(0)