Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » activeMenuSelection Expression Language
activeMenuSelection Expression Language [message #124850] Mon, 16 March 2009 16:20 Go to next message
Maghen Calinghee is currently offline Maghen CalingheeFriend
Messages: 23
Registered: July 2009
Junior Member
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 #125023 is a reply to message #124850] Mon, 16 March 2009 21:19 Go to previous messageGo to next message
Benjamin Muskalla is currently offline Benjamin MuskallaFriend
Messages: 338
Registered: July 2009
Senior Member
Hi Maghen,

if it works in RCP then this sounds like a bug. Could you please open a
bug report and attach a small snippet to reproduce this behavior? It
would be great!

Thanks!
Benny

Maghen Calinghee wrote:
> 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.
>


--
Benjamin Muskalla | EclipseSource Karlsruhe
http://www.eclipsesource.com | http://twitter.com/eclipsesource
Re: activeMenuSelection Expression Language [message #125099 is a reply to message #125023] Tue, 17 March 2009 10:06 Go to previous messageGo to next message
Maghen Calinghee is currently offline Maghen CalingheeFriend
Messages: 23
Registered: July 2009
Junior Member
Hi Benny,

Thanks you for replying.

I have logged the bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=268936

I've provided a snippet where you can try to reproduce the bug. It's a
ViewPart containing a Button and label.
If you click on the Button, you will see that the Label will display just
the String of the Object which is stored in the "activeMenuSelection"
expression.
But in RAP, this expression does not exist so the Object is null.

Thanks you for your time.

Maghen.
Re: activeMenuSelection Expression Language [message #127342 is a reply to message #125099] Mon, 06 April 2009 12:48 Go to previous message
Maghen Calinghee is currently offline Maghen CalingheeFriend
Messages: 23
Registered: July 2009
Junior Member
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
Previous Topic:RAP Templates not working?
Next Topic:JavaScript Error in IE7 starting the Demo
Goto Forum:
  


Current Time: Sat Apr 20 01:21:30 GMT 2024

Powered by FUDForum. Page generated in 0.03490 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top