Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Programatically evaluating core expression (on-demand with dedicated context)

Ho Mickael,

We have used the core _expression_ extensions like you describe [1]. Please check out the commits around aug-7 2011. We have an extension point that provides a newsgroup based on the location in the IDE using the _expression_ fw.

For example, if the user is working in an ECF view, ECF can provide a newsgroup that is associated to this view by using the extension point and the core _expression_ framework.

It works like this:

* User wants to ask a question in a forum
* User presses the "ask a question" button
* Active part is found
* The core expressions in the extension point "newsgroupprovider" are evaluated
* A newsgroup is found.
* User posts question in this newsgroup


On Mon, Dec 15, 2014 at 11:34 AM, Mickael Istria <mistria@xxxxxxxxxx> wrote:
Hi all,

I have a question about the Core _expression_ framework.
As part of https://bugs.eclipse.org/421930 and https://github.com/jbosstools/jbosstools-playground/issues/21 , I'm trying to add to an extension point an "activeWhen" element which would allow users to define Core Expressions. Then in the code consuming the extension point, I'd like to be able to evaluate such expressions on-demand (since they don't change the continuous behaviour of the workbench, they are only used from inside a command Handler) and against a different context (context of evaluation would be a resource or a filesystem element, not a selection).
I've seen the IEvaluationService which seems quite reactive and event-oriented and not imperative, so I have some difficulties to understand how to correctly use it for this scenario. Should I directly create and use an instand of EvaluationReference instead? Do you have some pointers to similar usage of core properties?

Cheers,
--
Mickael Istria
Eclipse developer at JBoss, by Red Hat
My blog - My Tweets

_______________________________________________
platform-ui-dev mailing list
platform-ui-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-ui-dev

Back to the top