activeMenuSelection Expression Language [message #124850] |
Mon, 16 March 2009 12:20  |
Eclipse User |
|
|
|
Hi,
I'm using the "activeMenuSelection" variable to know if i can display
different label in a ViewPart. I use the EvaluationContext to get the
"activeMenuSelection" but it is not defined in the context, there are
others variables as "selection", "activeWorkbenchWindow", "activeShell",
"activeContexts", "activeMenu" but there is no "activeMenuSelection" so i
get an error when i'm trying to retrieve this variable.
I know this variable is supported in RAP because i use it to display a
popup menu but i also use it in order to display or not the menu items
into a view.
I would like to know if it is normal because in RCP my code works
correctly.
Maghen.
|
|
|
|
|
Re: activeMenuSelection Expression Language [message #127342 is a reply to message #125099] |
Mon, 06 April 2009 08:48  |
Eclipse User |
|
|
|
Hi,
I have other problems on the variable in RAP. I'm using the
"activeFocusControlId" variable in my plugin.xml and more exactly, i use
it to display a popup menu in a Table cell according to the "Data" of the
cell. The problem is that i'm using many Table and i don't register all of
them to the FocusService. So when i display a popup menu, thanks to the
plugin.xml, the "activeFocusControlId" is evaluated to know if i can
display item in the menu. But if the Table is not registered to the
FocusService, the evaluation of the other expressions is stopped.
This is the way i use the "activeFocusControlId".
<definition
id="inClientContext">
<or>
<with
variable="activeFocusControlId">
<equals
value="clientTable">
</equals>
</with>
<with
variable="selection">
<iterate
ifEmpty="false"
operator="and">
<instanceof
value="metadata.client.WrapperClientData">
</instanceof>
</iterate>
</with>
</or>
</definition>
In RAP, the evaluation of the definition "inClientContext" is stopped on
"activeFocusControlId" just before the "selection" test whereas in RCP,
the evaluation goes until the "selection" test if there is no
"activeFocusControlId".
I don't know if this problem is linked to the "activeMenuSelection" bug.
Also i would like to know if we do a test on an "undefined" variable in
the plugin.xml, what will happen? It returns false if i do an "equals"
test on the undefined variable?
If someone knows something about this, i would appreciate.
Thanks.
Maghen
|
|
|
Powered by
FUDForum. Page generated in 0.04802 seconds