Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315766 - [Workbench] ActionFactory.CLOSE_OTHERS is not updated properly
Summary: [Workbench] ActionFactory.CLOSE_OTHERS is not updated properly
Status: ASSIGNED
Alias: None
Product: RAP
Classification: RT
Component: Workbench (show other bugs)
Version: 1.3   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-04 09:54 EDT by Niels Lippke CLA
Modified: 2010-10-22 04:48 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.