Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Programatically evaluating expressions
Programatically evaluating expressions [message #326548] Mon, 24 March 2008 22:43 Go to next message
Eclipse UserFriend
Originally posted by: bvkiran.yahoo.com

I have a custom toolbar within my editor where I want to leverage
core.expressions. I have a expression definition defined and I would like
to evaluate this given a editor context. Much similar to how menus and
toolbars work. Is there a way I can achieve this?
Re: Programatically evaluating expressions [message #326619 is a reply to message #326548] Wed, 26 March 2008 14:59 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

You can use IMenuService to populate your custom toolbar (just give it a
special location uri like "toolbar:my.view.id.special.toolbar") and then
you can use org.eclipse.ui.menus contributions just like the normal
toolbars, and they will honour core expression.

THe other alternative in 3.4 is to use the IEvaluationService (which
takes a core expression and informs an IPropertyChangeListener of any
changes). The IEvaluationService is internal in 3.3 but API in 3.4

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm


Previous Topic:Need to place a label in toolbar
Next Topic:Hide popup submenu for multiple selection
Goto Forum:
  


Current Time: Thu Dec 26 21:28:48 GMT 2024

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

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

Back to the top