On Tue, Sep 4, 2012 at 10:26 AM, Andy Clement <andrew.clem...@gmail.com>wrote:
> There are quite a few uses for named type patterns. This bug was the > original one to talk about them: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=63304 > > proposing a syntax like this: > > declare typename: PublicFinalType: public final *; > > That syntax would be fine, I suppose, but certainly different than named pointcuts, which I was trying to say close to by sticking to the principal of least surprise. Either way, that capability would be good. > I hadn't thought about it being used to get around the multiple annos > on declare @type though. Mind you, it is even more work to implement > that than to implement the enhancement for declare @type ! > > Oh, noooooooooooo!!!!! :P > cheers, > Andy > > On 29 August 2012 20:43, Matthew Adams <matt...@matthewadams.me> wrote: > > Hey, you know, I was thinking that if I could name type expressions > > like I can name pointcuts, then this wouldn't be as big a deal. > > > > Consider: > > > > declare @type : org.example.foo.Bar+ : @Goo; > > declare @type : org.example.foo.Bar+ : @Hoo; > > > > I have no idea what a good syntax might be to name type expressions. > > Perhaps a new pointcut designator like "type"? Then, you could write: > > > > pointcut thoseAnnoyingTypes() : type(org.example.foo.Bar+); /* > > admittedly not really a pointcut... */ > > > > declare @type : thoseAnnoyingTypes() : @Goo; > > declare @type : thoseAnnoyingTypes() : @Hoo; > > > > I'm pretty sure named type expressions would be useful elsewhere, like > > in "declare error" & "declare warning" statements, and pointcut > > designators "handler", "within", etc: > > > > pointcut thoseAnnoyingTypes() : type(org.example.foo.Bar+); > > > > declare @type : thoseAnnoyingTypes() : @Goo, @Hoo; > > > > pointcut withinAnnoyingTypes() : within(thoseAnnoyingTypes()); > > > > Thoughts? > > > > On Thu, Aug 16, 2012 at 1:08 PM, Andy Clement <andrew.clem...@gmail.com> > wrote: > >> > >> Hi Matthew, > >> > >> I guess you mean https://bugs.eclipse.org/bugs/show_bug.cgi?id=356594 > >> - which you raised :) > >> > >> I just had a quick look and added a testcase but the implementation > >> isn't as trivial as I'd hoped. A lot of infrastructure is just > >> dealing with one annotation per declare anno statement. > >> > >> cheers, > >> Andy > >> > >> On 16 August 2012 07:13, Matthew Adams <matt...@matthewadams.me> wrote: > >> > Hi all, > >> > > >> > I recall this was a question a couple of years ago. > >> > > >> > Can you now use a single "declare @type" statement to introduce > several > >> > annotations at once? That way, instead of: > >> > > >> > declare @type : org.example.foo.Bar+ : @Goo; > >> > declare @type : org.example.foo.Bar+ : @Hoo; > >> > > >> > you could write: > >> > > >> > declare @type : org.example.foo.Bar+ : @Goo, @Hoo; > >> > > >> > Thanks, > >> > Matthew > >> > -- > >> > mailto:matt...@matthewadams.me > >> > skype:matthewadams12 > >> > googletalk:matt...@matthewadams.me > >> > http://matthewadams.me > >> > http://www.linkedin.com/in/matthewadams > >> > > >> > > >> > _______________________________________________ > >> > aspectj-users mailing list > >> > aspectj-users@eclipse.org > >> > https://dev.eclipse.org/mailman/listinfo/aspectj-users > >> > > >> _______________________________________________ > >> aspectj-users mailing list > >> aspectj-users@eclipse.org > >> https://dev.eclipse.org/mailman/listinfo/aspectj-users > > > > > > > > > > -- > > mailto:matt...@matthewadams.me > > skype:matthewadams12 > > googletalk:matt...@matthewadams.me > > http://matthewadams.me > > http://www.linkedin.com/in/matthewadams > > _______________________________________________ > > aspectj-users mailing list > > aspectj-users@eclipse.org > > https://dev.eclipse.org/mailman/listinfo/aspectj-users > _______________________________________________ > aspectj-users mailing list > aspectj-users@eclipse.org > https://dev.eclipse.org/mailman/listinfo/aspectj-users > -- mailto:matt...@matthewadams.me <matt...@matthewadams.me> skype:matthewadams12 googletalk:matt...@matthewadams.me http://matthewadams.me http://www.linkedin.com/in/matthewadams
_______________________________________________ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users