Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » e4 Handler enabledWhen expression(EnabledWhen expression not appears in Model Editor)
e4 Handler enabledWhen expression [message #1692334] Wed, 15 April 2015 07:21 Go to next message
Loic Faure is currently offline Loic FaureFriend
Messages: 24
Registered: December 2014
Junior Member
Hi,

In 3x there was enabledWhen attribute for handler which allows developpers to define specifics constraints for enabling or not their handler. This was very usefull because class doesn't need to be initialize for evaluating the expression.

In 4x there is not this attribute. Do I need to use only the method annotated with @CanExecute or maybe this attribute will be add to the model ?

Thanks
Re: e4 Handler enabledWhen expression [message #1692340 is a reply to message #1692334] Wed, 15 April 2015 07:44 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6359
Registered: July 2009
Senior Member
e4 only supports @CanExecute - there's currently no plans to add
enabledWhen to the model.

Tom

On 15.04.15 09:21, Loic Faure wrote:
> Hi,
>
> In 3x there was enabledWhen attribute for handler which allows
> developpers to define specifics constraints for enabling or not their
> handler. This was very usefull because class doesn't need to be
> initialize for evaluating the expression.
>
> In 4x there is not this attribute. Do I need to use only the method
> annotated with @CanExecute or maybe this attribute will be add to the
> model ?
>
> Thanks
Re: e4 Handler enabledWhen expression [message #1692574 is a reply to message #1692340] Thu, 16 April 2015 15:02 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 650
Registered: January 2012
Senior Member

The enabledWhen was necessary as handlers were all defined at the application level, and the enabledWhen expressions were used to describe the situations where a handler was applicable (e.g., a view or editor). In Eclipse 4, you can define handlers at their use-point.

Brian.


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Re: e4 Handler enabledWhen expression [message #1692661 is a reply to message #1692574] Fri, 17 April 2015 09:39 Go to previous message
Loic Faure is currently offline Loic FaureFriend
Messages: 24
Registered: December 2014
Junior Member
Ok thanks for the answers, so can I programmatically call Core Expressions in my canExecute method ? Because my enabledWhen attribute are linked to core expressions.

Previous Topic:One window trough effect other window
Next Topic:E4 Injection/Event System
Goto Forum:
  


Current Time: Wed Sep 20 11:16:50 GMT 2017

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

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