Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » visibleWhen Expression not evaluated at startup
visibleWhen Expression not evaluated at startup [message #649699] Thu, 20 January 2011 06:14 Go to next message
Eclipse UserFriend
Hi there,

I try to add contribution items via the org.eclipse.ui.menu extension
point with visibleWhen core expressions. In general this works fine.

However, it seems that toolbar buttons often do not appear immediately
after Eclipse startup, e.g. if a corresponding Editor is already open
for which an with-activeEditor-equals-myID expression was defined. Only
after some switching between different editors, the buttons will appear
correctly.

The reason seems to be that the contribution item isVisible() predicate
uses the "last expression evaluation result" which seems to be not
evaluated in the very beginning yet.

Is there a way to trigger the evaluation of these visibleWhen
expressions programmatically somehow, e.g. via the MenuService?

Cheers,
Hauke
Re: visibleWhen Expression not evaluated at startup [message #649723 is a reply to message #649699] Thu, 20 January 2011 07:50 Go to previous message
Eclipse UserFriend
It might be one of any number of problems. But in theory you can
programmatically request a re-evaluation by using
org.eclipse.ui.services.IEvaluationService.requestEvaluation (String)

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm
Previous Topic:Tigris Subeclipse plugin fails (silently) on Eclipse
Next Topic:Installation failure for ECUT plugin
Goto Forum:
  


Current Time: Tue Jul 22 19:57:14 EDT 2025

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

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

Back to the top