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

Bug 361472

Summary: [Compatibility] View action are disabled when its view is not active
Product: [Eclipse Project] Platform Reporter: Remy Suen <remy.suen>
Component: UIAssignee: Paul Webster <pwebster>
Status: VERIFIED FIXED QA Contact: Paul Webster <pwebster>
Severity: normal    
Priority: P3 CC: curtis.windatt.public, steffen.pingel
Version: 4.2   
Target Milestone: 4.2 M7   
Hardware: All   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=372684
Whiteboard:
Bug Depends on:    
Bug Blocks: 321278    

Description Remy Suen CLA 2011-10-19 16:14:47 EDT
The 'Breakpoints' view's 'Remove Selected Breakpoints' and 'Remove All Breakpoints' actions are disabled when the view is inactive. They enable themselves when the view becomes the active view. In 3.x they are always active.
Comment 1 Remy Suen CLA 2012-01-11 14:28:07 EST
The canExecute(*) method returns false because no applicable handler can be found so the item disables itself.
Comment 2 Remy Suen CLA 2012-02-29 12:42:42 EST
Not sure what we can do here. These actions' expressions are instantiated by LegacyActionPersistence and are registered with the window's handler service and are evaluated whenever the active part changes.
Comment 3 Paul Webster CLA 2012-02-29 12:48:02 EST
The difference would be that in 3.x those buttons are backed by the viewActions, as opposed to the handlers.

Possible solutions involve having the LegacyActionPersistence create and activate the handlers at the view IEclipseContext level.  Then they'll always be found from the view's toolbar.

Or if I re-activate viewActions, then they would be MOpaqueToolItems backed by ACIs and the problem goes away.

PW
Comment 4 Paul Webster CLA 2012-03-19 10:09:34 EDT
I've started working on this in pwebster/legacyViewActions

PW
Comment 6 Curtis Windatt CLA 2012-05-01 12:53:02 EDT
Verified in I20120430-1800