Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 315766

Summary: [Workbench] ActionFactory.CLOSE_OTHERS is not updated properly
Product: [RT] RAP Reporter: Niels Lippke <niels.lippke>
Component: WorkbenchAssignee: Project Inbox <rap-inbox>
Status: ASSIGNED --- QA Contact:
Severity: normal    
Priority: P3    
Version: 1.3   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Niels Lippke CLA 2010-06-04 09:54:17 EDT
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 ) );
     }
 ...
Comment 1 Ivan Furnadjiev CLA 2010-10-22 04:48:20 EDT
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.