Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » Core expressions not evaluated at runtime
Core expressions not evaluated at runtime [message #1630655] Mon, 23 February 2015 10:07 Go to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Hi,

I have created an example with several use cases for the evaluation of core expressions. Within a menu that is opened, everything looks fine. But in part toolbars, trimbars and the main menu, the core expressions are not evaluated. For the main menu it only happens initially, but it is not updated on changes. For the trimbars and the toolbars not even the initial state is set correctly.

I face the same issue in Eclipse with SWT aswell as in e(fx)clipse. No updates of the already visible toolbar/menu items.

In e(fx)clipse I even get an exception if the core expression evaluates to true on modifying the context value:

Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: Children: duplicate children added: parent = HBox@16ab1e8[styleClass=container]

Is this a known issue?
Should it work or are core expressions not supported on the toolbar/main menu level?

IIRC the main menu is re-rendered constantly. At least that was the case in early versions of e4. Has this changed? And if so, how could the main menu for example listen for such updates? I have seen that there are event topics for core expressions, but it seems nobody triggers them.

Greez,
Dirk
Re: Core expressions not evaluated at runtime [message #1630817 is a reply to message #1630655] Mon, 23 February 2015 12:11 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
I also notice that DirectMenuItems and HandledMenuItems are not rendered in the Main Menu when added without a Menu.
Re: Core expressions not evaluated at runtime [message #1630942 is a reply to message #1630817] Mon, 23 February 2015 13:50 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
On 23.02.15 13:11, Dirk Fauth wrote:
> I also notice that DirectMenuItems and HandledMenuItems are not rendered
> in the Main Menu when added without a Menu.

This is unrelated and IIRC not possible in JavaFX because the Main-Menu
is a MenuBar who can only contain Menu but no MenuItem.

Tom
Re: Core expressions not evaluated at runtime [message #1630956 is a reply to message #1630655] Mon, 23 February 2015 13:59 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi,

On 23.02.15 11:07, Dirk Fauth wrote:
> Hi,
>
> I have created an example with several use cases for the evaluation of
> core expressions. Within a menu that is opened, everything looks fine.
> But in part toolbars, trimbars and the main menu, the core expressions
> are not evaluated. For the main menu it only happens initially, but it
> is not updated on changes. For the trimbars and the toolbars not even
> the initial state is set correctly.
>
> I face the same issue in Eclipse with SWT aswell as in e(fx)clipse. No
> updates of the already visible toolbar/menu items.

You need to request an update since Luna. The constant polling code had
been removed.

>
> In e(fx)clipse I even get an exception if the core expression evaluates
> to true on modifying the context value:
>
> Exception in thread "JavaFX Application Thread"
> java.lang.IllegalArgumentException: Children: duplicate children added:
> parent = HBox@16ab1e8[styleClass=container]

I'm not sure I get understand what's going wrong here or what you describe.

>
> Is this a known issue? Should it work or are core expressions not
> supported on the toolbar/main menu level?
>

They should be supported anywhere but as I said you need to request them
to be reevaluated. There are (common) situations where they are
reevaluated by default.

> IIRC the main menu is re-rendered constantly. At least that was the case

No this was pre Luna

> in early versions of e4. Has this changed? And if so, how could the main

Yes

> menu for example listen for such updates? I have seen that there are

Yes you need to send
eventBroker.post(UIEvents.REQUEST_ENABLEMENT_UPDATE_TOPIC,
UIEvents.ALL_ELEMENT_ID) which reevaluates all elements.

> event topics for core expressions, but it seems nobody triggers them.
>

The enablement stuff is at BaseItemContainerRenderer and other renderers
depend on it.

Tom
Previous Topic:Mac OSx Image and DMG Build Error
Next Topic:Autogenerated object not available in a lifecycle hook ?
Goto Forum:
  


Current Time: Fri Apr 26 02:35:25 GMT 2024

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

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

Back to the top