Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361472 - [Compatibility] View action are disabled when its view is not active
Summary: [Compatibility] View action are disabled when its view is not active
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.2 M7   Edit
Assignee: Paul Webster CLA
QA Contact: Paul Webster CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 321278
  Show dependency tree
 
Reported: 2011-10-19 16:14 EDT by Remy Suen CLA
Modified: 2012-05-01 12:53 EDT (History)
2 users (show)

See Also:


Attachments

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