|visibleWhen Expression not evaluated at startup [message #649699]
||Thu, 20 January 2011 06:14
| Hauke Fuhrmann
Registered: July 2009
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
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?
Powered by FUDForum
. Page generated in 0.01463 seconds