[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] I'd like to add static utility methods to UIEvents


+1 both for having the methods and for making them static...

For myself I prefer the more explicit versions such as 'isAdd' rather than the more generic 'containsArg' but don't really have any problem with the generic one as well...

Note that if we don't use static methods we're in effect making the UIEvents class a 'service'...now there may be advantages to doing that such as being able to hide EventAdmin away by having subscribe methods in UIEvents....

Onwards,
Eric


From: Paul Webster <pwebster@xxxxxxxxxxxxxxxxxxx>
To: E4 Project developer mailing list <e4-dev@xxxxxxxxxxx>
Date: 02/21/2012 01:00 PM
Subject: Re: [e4-dev] I'd like to add static utility methods to UIEvents
Sent by: e4-dev-bounces@xxxxxxxxxxx





On Mon, Feb 20, 2012 at 4:10 AM, Dimitar Georgiev <anakin.bg@xxxxxxxxx> wrote:
Out of general style considerations, I prefer the instance method. Static hinders polymorphism.
Regards, Dimitar


UIEvents is a (mostly) auto-generated utility class (constants and static methods).   While I agree in general we don't use static methods, in this case I think it's acceptable.

PW



--
Paul Webster
Hi floor.  Make me a sammich! - GIR
_______________________________________________
e4-dev mailing list
e4-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/e4-dev