Community
Participate
Working Groups
The CLOSE_OTHERS action should maintain its enablement state. But it is always false. This behaviour is tested by adding context menu to the partbutton of the custom design, e.g.: ViewStackPresentation.createPartButton(): ... if (getType().equals( PresentationFactory.KEY_EDITOR )) { IWorkbench workbench = PlatformUI.getWorkbench(); IWorkbenchWindow window = workbench.getActiveWorkbenchWindow(); MenuManager mgr = new MenuManager(); mgr.add( ActionFactory.CLOSE.create( window ) ); mgr.add( ActionFactory.CLOSE_OTHERS.create( window ) ); mgr.add( ActionFactory.CLOSE_ALL.create( window ) ); mgr.add( new Separator() ); mgr.add( ActionFactory.NEW_EDITOR.create( window ) ); partButton.setMenu( mgr.createContextMenu( partButton ) ); } ...
It's working in Workbench Demo -> Planning Perspective. Open several editors and right click on the editor titlebar to bring the context menu. "Close Others" menu item maintains its enablement state as expected. Maybe this menu item is constructed in a different way?! Need more investigations.