Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » VisibleWhen core expression not working for Menu
VisibleWhen core expression not working for Menu [message #988845] Mon, 03 December 2012 12:57 Go to next message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1289
Registered: July 2012
Senior Member
Hi,

I am trying to work with visibleWhen expressions like I did in Eclipse 3.x

I have a menu that should become visible when a special state has changed.

I know it can be done by setting the visible flag on MMenu, but for menu items, the core expressions are supported and working fine. So the visible state can be changed in a declarative way via core expressions, while it doesn't work for menus.

<children xsi:type="menu:Menu" xmi:id="_hHh3gA71EeKHWs52dCVHSA" elementId="myMenu" label="%menuView">
        <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_a76vAD1GEeKO6rLowasyrA" coreExpressionId="myExpression"/>
        <children xsi:type="menu:HandledMenuItem" xmi:id="_cxlUABKwEeKc-_aDwX6lwg" elementId="myHandler" label="Do something" iconURI="platform:/plugin/myapp/icons/file_obj.gif" command="_g5JbwBKvEeKc-_aDwX6lwg">
        </children>
        <children xsi:type="menu:DirectMenuItem" xmi:id="_yLT5kBLPEeKc-_aDwX6lwg" elementId="myDirectHandler" label="Do something else" selected="true" type="Check">
          <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_BBq-ED1HEeKO6rLowasyrA" coreExpressionId="myExpression"/>
        </children>
      </children>


The question is, is using core expressions the way to manage the visible state in a declarative way in Eclipse 4 like it was in Eclipse 3.x?

If it is, should menus also be able to use core expressions like the Application Model Editor supposes to (you have the option to add one via the editor)?

And if so, is this bug already reported?

Greez,
Dirk
Re: VisibleWhen core expression not working for Menu [message #1032714 is a reply to message #988845] Wed, 03 April 2013 10:35 Go to previous messageGo to next message
Istvan Meszaros is currently offline Istvan Meszaros
Messages: 44
Registered: October 2009
Member
Any new on this topic? I ran into the same problem. It would be great if VW expressions could be used on Menus.
Re: VisibleWhen core expression not working for Menu [message #1032745 is a reply to message #1032714] Wed, 03 April 2013 11:36 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1289
Registered: July 2012
Senior Member
I created a bug for this. But there is no activity on it yet. Maybe there need to be more votes on it.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=400217
Re: VisibleWhen core expression not working for Menu [message #1032764 is a reply to message #1032745] Wed, 03 April 2013 12:06 Go to previous messageGo to next message
Istvan Meszaros is currently offline Istvan Meszaros
Messages: 44
Registered: October 2009
Member
I voted for it Smile thanks.
Re: VisibleWhen core expression not working for Menu [message #1032765 is a reply to message #1032764] Wed, 03 April 2013 12:07 Go to previous message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

It's been triaged so it's probably on someone's queue.
Previous Topic:Saving dirty parts in all perspectives
Next Topic:exposing eclipse 3.x resources trough a e4.tools service
Goto Forum:
  


Current Time: Sun Sep 21 12:18:54 GMT 2014

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

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