Skip to main content


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: 6651
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
Eclipse UserFriend
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.
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:Eclipse RCP: "File>New" menu emptied after using the same menu in the toolbar
Next Topic:Editor Questions - multiple editors / Form Editor in e4
Goto Forum:
  


Current Time: Tue Mar 19 02:49:06 GMT 2024

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

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

Back to the top