This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 412681 - [Regression] IExecutionListener.preExecute receives ExecutionEvent incompatible with HandlerUtil methods
Summary: [Regression] IExecutionListener.preExecute receives ExecutionEvent incompatib...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.3   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.4 M1   Edit
Assignee: Paul Elder CLA
QA Contact: Paul Webster CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 414976
  Show dependency tree
 
Reported: 2013-07-10 10:42 EDT by Paul Elder CLA
Modified: 2013-08-13 09:47 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 Paul Elder CLA 2013-07-10 10:42:07 EDT
In 4.2, IExecutionListener.preExecute() receives an ExecutionEvent whose getApplicationContext() value is an IEvaluationContext instance.

In 4.3, it was now a org.eclipse.e4.core.commands.internal.HandlerServiceImpl.ExecutionContexts instance.

The end result is that HandlerUtil methods no longer work in IExecutionListener.preExecute().
Comment 1 Paul Elder CLA 2013-07-15 12:16:00 EDT
Proposed fix pushed to Gerrit for review:

 https://git.eclipse.org/r/14564

Fix includes:
* unit test modifications to verify the expected behavior
* revert HandlerServiceImpl to pass ExpressionContext objects to Command.setEnabled and Command.executeWithChecks() (instead of the private ExecutionContexts object).
* Change HandlerServiceHandler to retieve static contexts from the HandlerServiceImpl's stack, and cross check these with the execution context received.

Passes UIAllTests and UI API Test Suite, as well as the modified CommandExecutionTest (which is not part of either suite).
Comment 3 Paul Elder CLA 2013-07-29 09:42:14 EDT
Fixed in 4.4