This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 283536 - [Compatibility] Handlers activated at the global level
Summary: [Compatibility] Handlers activated at the global level
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 0.9   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 0.9 RC2   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-15 08:09 EDT by Paul Webster CLA
Modified: 2009-07-22 10:09 EDT (History)
3 users (show)

See Also:


Attachments
Activate handlers that pass in core Expressions v01 (10.53 KB, patch)
2009-07-20 15:22 EDT, Paul Webster CLA
no flags Details | Diff
Activate handlers that pass in core Expressions v03 (17.55 KB, patch)
2009-07-20 20:47 EDT, Paul Webster CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Webster CLA 2009-07-15 08:09:48 EDT
Handlers that are activated at the global level need to use their activeWhen clause to determine the correct handler if there are more than one.

PW
Comment 1 Paul Webster CLA 2009-07-20 15:22:31 EDT
Created attachment 142064 [details]
Activate handlers that pass in core Expressions v01

If a handler is activated with a core expression, try and make sure the active handler is the active handler with the greatest priority.

It involves some runAndTrack chicanery ...

it both calls get on "HANDLER_PREFIX + cmdId" and an activeHandler on the EHandlerService (which is a set on that).

It appears to be tracking a number of handler activations correctly now and I haven't noticed a loop ... but that's not proof.


PW
Comment 2 Boris Bokowski CLA 2009-07-20 17:32:14 EDT
(In reply to comment #1)
> It involves some runAndTrack chicanery ...

hehe!

> It appears to be tracking a number of handler activations correctly now and I
> haven't noticed a loop ... but that's not proof.

If you are concerned about cyclic dependencies (infinite loops) those would be detected and logged.
Comment 3 Paul Webster CLA 2009-07-20 20:47:35 EDT
Created attachment 142084 [details]
Activate handlers that pass in core Expressions v03

Activate the handlers, also include more new variables for bug 283182

Most of the crazy work is done in org.eclipse.ui.LegacyHandlerService.EHandlerActivation.run() and the fragment Workbench and WorkbenchWindow have to "shuffle" to provide useful variables to the expressions.

PW
Comment 4 Paul Webster CLA 2009-07-20 20:48:46 EDT
(In reply to comment #3)
> Created an attachment (id=142084) [details]
> Activate handlers that pass in core Expressions v03

Released for I20090720-2100
PW
Comment 5 Paul Webster CLA 2009-07-22 10:09:03 EDT
This is available in the current build ... we try and honour activeWhen clauses and programmatic core Expressions.

PW