Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Is enableWhen missing the e4 application model?

It's exactly the opposite!!!!:

- activeWhen defines if a handler is active in a certain context (eg the
current active context is a Part)

- enabledWhen defines if a handler is enabled eg the current Part is dirty

Tom

On 10.02.16 19:51, Lars Vogel wrote:
> activeWhen is used to determine if a handler can be executed, e.g. the
> save command is only executable if there is something to save.
> 
> enabledWhen is used to define if a handler is relevant. Similar to
> defining a handler for a part but more flexible, e.g., you can use core
> expressions to define this. Eclipse can only have one enabled handler at
> the same time.
> 
> Am 10.02.2016 7:40 nachm. schrieb "Dirk Fauth" <dirk.fauth@xxxxxxxxx
> <mailto:dirk.fauth@xxxxxxxxx>>:
> 
>     Maybe a stupid question, but what is the difference between
>     activeWhen and enabledWhen? Eclipse 3.x development is so long ago...
> 
>     On Wed, Feb 10, 2016 at 7:29 PM, Lars Vogel <lars.vogel@xxxxxxxxxxx
>     <mailto:lars.vogel@xxxxxxxxxxx>> wrote:
> 
>         Ahhh... Wrong again, sounds like my mind is wired wrong.
> 
>         This one should be correct:
> 
>         @CanExecute is a replacement for enabledWhen
> 
>         activeWhen is missing, I think
> 
>         Am 10.02.2016 7:25 nachm. schrieb "Lars Vogel"
>         <lars.vogel@xxxxxxxxxxx <mailto:lars.vogel@xxxxxxxxxxx>>:
> 
>             Sorry, last email was wrong.
> 
>             @CanExecute is an replacement for enabledWhen
> 
>             For activeWhen I'm not aware of a replacement
> 
>             Am 10.02.2016 7:23 nachm. schrieb "Dirk Fauth"
>             <dirk.fauth@xxxxxxxxx <mailto:dirk.fauth@xxxxxxxxx>>:
> 
>                 That was your question from the mail subject
> 
>                 On Wed, Feb 10, 2016 at 7:13 PM, Lars Vogel
>                 <lars.vogel@xxxxxxxxxxx <mailto:lars.vogel@xxxxxxxxxxx>>
>                 wrote:
> 
>                     @CanExecute is a replacement for enabledWhen
> 
>                     Am 10.02.2016 7:09 nachm. schrieb "Dirk Fauth"
>                     <dirk.fauth@xxxxxxxxx <mailto:dirk.fauth@xxxxxxxxx>>:
> 
>                         Hi,
> 
>                         IIRC there is no activeWhen or enabledWhen
>                         because of the @CanExecute that can be used with
>                         e4 handlers.
> 
>                         Greez,
>                         Dirk
> 
>                         On Wed, Feb 10, 2016 at 6:32 PM, Lars Vogel
>                         <lars.vogel@xxxxxxxxxxx
>                         <mailto:lars.vogel@xxxxxxxxxxx>> wrote:
> 
>                             Hi,
> 
>                             I was planning to convert existing e3 IDE
>                             handler implementations to
>                             e4 for Eclipse 4.6. This should be pretty
>                             straight forward, as most of
>                             our handlers are internal API and you can
>                             define e4 handler for e3
>                             commands because of our amazing Eclipse e4
>                             implementation.
> 
>                             But basically every interesting handler
>                             implementation I looked at,
>                             was using an activeWhen expression and AFAIK
>                             we do not support this in
>                             e4.
> 
>                             Is anyone aware why this is missing? Or do
>                             we have a workaround? I
>                             know we have the content hierarchy but this
>                             does not allow to define a
>                             active handler for example based on the
>                             selected type.
> 
>                             Best regards, Lars
> 
>                             P.S. I'm not posting this to the e4 mailing
>                             list, as the  e4
>                             application model has been migrated a long
>                             time ago to platform UI.
> 
> 
>                             --
>                             Eclipse Platform UI and e4 project co-lead
>                             CEO vogella GmbH
> 
>                             Haindaalwisch 17a, 22395 Hamburg
>                             Amtsgericht Hamburg: HRB 127058
>                             Geschäftsführer: Lars Vogel, Jennifer
>                             Nerlich de Vogel
>                             USt-IdNr.: DE284122352
>                             Fax (040) 5247 6322
>                             <tel:%28040%29%205247%206322>, Email:
>                             lars.vogel@xxxxxxxxxxx
>                             <mailto:lars.vogel@xxxxxxxxxxx>, Web:
>                             http://www.vogella.com
>                             _______________________________________________
>                             platform-ui-dev mailing list
>                             platform-ui-dev@xxxxxxxxxxx
>                             <mailto: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
> 
> 
> 
>                         _______________________________________________
>                         platform-ui-dev mailing list
>                         platform-ui-dev@xxxxxxxxxxx
>                         <mailto: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
> 
> 
>                     _______________________________________________
>                     platform-ui-dev mailing list
>                     platform-ui-dev@xxxxxxxxxxx
>                     <mailto: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
> 
> 
> 
>                 _______________________________________________
>                 platform-ui-dev mailing list
>                 platform-ui-dev@xxxxxxxxxxx
>                 <mailto: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
> 
> 
>         _______________________________________________
>         platform-ui-dev mailing list
>         platform-ui-dev@xxxxxxxxxxx <mailto: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
> 
> 
> 
>     _______________________________________________
>     platform-ui-dev mailing list
>     platform-ui-dev@xxxxxxxxxxx <mailto: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
> 
> 
> 
> _______________________________________________
> 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
> 


-- 
Thomas Schindl, CTO
BestSolution.at EDV Systemhaus GmbH
Eduard-Bodem-Gasse 5-7, A-6020 Innsbruck
http://www.bestsolution.at/
Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck


Back to the top