I've used the "activeMenuSelection" and it works well, thanks you Paul and
Tom. But i'm trying to understand how the "selection" works. I have a view
with a viewer which contributes to the selection service as selection
provider. And i have created another view which listens to this provider.
I would like to display in this view the same menu items which appear in
the pop up menu of the first view when i do a selection in that part. I
would to use the extension point "org.eclipse.expressions.definitions"
where i defined the rules which allow to display the menu item or not. But
this time, i use the "selection" variable to know the selection in the
first view. And it does not work properly, i need to re-activate the first
view to make it work correctly. I'm wondering how can i do this correctly.
Moreover i use in the first view a "dynamic selection provider" because i
have several viewers. But i don't think it is linked to my problem.