| Summary: | [Compatibility] View action are disabled when its view is not active | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Remy Suen <remy.suen> |
| Component: | UI | Assignee: | 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
The canExecute(*) method returns false because no applicable handler can be found so the item disables itself. 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. 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 I've started working on this in pwebster/legacyViewActions PW fixed with http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=1a449bf450b3b2276d9416226c553665bc04dfff PW Verified in I20120430-1800 |