Home » Language IDEs » AspectJ » Release plan AJDT & Annotation-style pointcuts based on annotaion values
| |
Re: Release plan AJDT & Annotation-style pointcuts based on annotaion values [message #56491 is a reply to message #56465] |
Wed, 07 September 2005 17:03 |
Eclipse User |
|
|
|
Originally posted by: schulz78.gmx.net
Matt Chapman wrote:
> Sven Schulz wrote:
>
>> what is the estimated release date of AJDT 1.3.0? I know it depends on
>> AspectJ, but i need an estimation only!
>
>
> October - as per the plans page:
> http://www.eclipse.org/ajdt/plans.html
> We hope to release very soon after the final release of AspectJ 5.
>
>> In the developer's notebook I saw a not annotation value based
>> pointcuts. When this will be incorporated into AspectJ?
>
>
> Do you mean the annotation based development style, whereby pointcuts
> and advice etc can be written as Java 5 annotations associated with
> methods? I believe much of this in already in AspectJ 5 M3, with more
> (such as support for inter-type declarations) to follow in M4.
>
> Regards,
>
> Matt.
>
>
Thanks Matt,
I know that much of the annotation-style thing is working, because I am
actively using it already. However, what is lacking is the ability to
have an advice applied iff a condition is true for the attributes of an
annotation. Consider the following
@MyAnnotation(foo = true)
class X {
}
@MyAnnotation(foo = false)
class Y {
}
It would be very nice to be able to define pointcuts that select the
first but not the second. Hope this clarifies what I mean?!
Regards,
Sven
|
|
|
Re: Release plan AJDT & Annotation-style pointcuts based on annotaion values [message #56517 is a reply to message #56491] |
Fri, 09 September 2005 10:06 |
Matt Chapman Messages: 429 Registered: July 2009 |
Senior Member |
|
|
Yes, this is possible by exposing the annotation context at runtime, so
long as your annotation has runtime retention, as mentioned in the
developer's notebook.
For example, say classes X and Y both have a bar() method, but you only
wanted to match the one in X, you could do something like:
before(MyAnnotation anno) : execution(* bar(..))
&& @within(anno) && if(anno.foo()) {
}
Note that in AJDT the markers and cross references view etc will show a
(potential) advises relationships for both X and Y, but the advice arrow
will be one with a question mark, which indicates that a runtime test is
going to be applied to determine that exact matches.
Regards,
Matt.
Sven Schulz wrote:
> Thanks Matt,
> I know that much of the annotation-style thing is working, because I am
> actively using it already. However, what is lacking is the ability to
> have an advice applied iff a condition is true for the attributes of an
> annotation. Consider the following
> @MyAnnotation(foo = true)
> class X {
> }
> @MyAnnotation(foo = false)
> class Y {
> }
> It would be very nice to be able to define pointcuts that select the
> first but not the second. Hope this clarifies what I mean?!
> Regards,
> Sven
|
|
| |
Re: Release plan AJDT & Annotation-style pointcuts based on annotaion values [message #56594 is a reply to message #56567] |
Mon, 12 September 2005 08:46 |
Eclipse User |
|
|
|
Originally posted by: mchapman.uk.ibm.com
On Sun, 11 Sep 2005 12:37:46 -0700, Barry Kaplan wrote:
> Matt, do the latest ajdt dev builds include aspectj M3? If not, what
> version. Could this info be added the download page?
Hi Barry,
Yes, the latest AJDT dev builds (both 1.2.1 and 1.3.0) contain AspectJ 5
M3a.
We plan to update the version of AspectJ contained in AJDT more
frequently, and when we do this we'll post here, and update the AJDT New
Features page (and post to the AJDT home page, which now offers an RSS
feed).
Regards,
Matt.
--
Matt Chapman
AJDT Development, http://www.eclipse.org/ajdt
|
|
| |
Re: Release plan AJDT & Annotation-style pointcuts based on annotaion values [message #590028 is a reply to message #56465] |
Wed, 07 September 2005 17:03 |
Eclipse User |
|
|
|
Originally posted by: schulz78.gmx.net
Matt Chapman wrote:
> Sven Schulz wrote:
>
>> what is the estimated release date of AJDT 1.3.0? I know it depends on
>> AspectJ, but i need an estimation only!
>
>
> October - as per the plans page:
> http://www.eclipse.org/ajdt/plans.html
> We hope to release very soon after the final release of AspectJ 5.
>
>> In the developer's notebook I saw a not annotation value based
>> pointcuts. When this will be incorporated into AspectJ?
>
>
> Do you mean the annotation based development style, whereby pointcuts
> and advice etc can be written as Java 5 annotations associated with
> methods? I believe much of this in already in AspectJ 5 M3, with more
> (such as support for inter-type declarations) to follow in M4.
>
> Regards,
>
> Matt.
>
>
Thanks Matt,
I know that much of the annotation-style thing is working, because I am
actively using it already. However, what is lacking is the ability to
have an advice applied iff a condition is true for the attributes of an
annotation. Consider the following
@MyAnnotation(foo = true)
class X {
}
@MyAnnotation(foo = false)
class Y {
}
It would be very nice to be able to define pointcuts that select the
first but not the second. Hope this clarifies what I mean?!
Regards,
Sven
|
|
|
Re: Release plan AJDT & Annotation-style pointcuts based on annotaion values [message #590033 is a reply to message #56491] |
Fri, 09 September 2005 10:06 |
Matt Chapman Messages: 429 Registered: July 2009 |
Senior Member |
|
|
Yes, this is possible by exposing the annotation context at runtime, so
long as your annotation has runtime retention, as mentioned in the
developer's notebook.
For example, say classes X and Y both have a bar() method, but you only
wanted to match the one in X, you could do something like:
before(MyAnnotation anno) : execution(* bar(..))
&& @within(anno) && if(anno.foo()) {
}
Note that in AJDT the markers and cross references view etc will show a
(potential) advises relationships for both X and Y, but the advice arrow
will be one with a question mark, which indicates that a runtime test is
going to be applied to determine that exact matches.
Regards,
Matt.
Sven Schulz wrote:
> Thanks Matt,
> I know that much of the annotation-style thing is working, because I am
> actively using it already. However, what is lacking is the ability to
> have an advice applied iff a condition is true for the attributes of an
> annotation. Consider the following
> @MyAnnotation(foo = true)
> class X {
> }
> @MyAnnotation(foo = false)
> class Y {
> }
> It would be very nice to be able to define pointcuts that select the
> first but not the second. Hope this clarifies what I mean?!
> Regards,
> Sven
|
|
| |
Re: Release plan AJDT & Annotation-style pointcuts based on annotaion values [message #590058 is a reply to message #56567] |
Mon, 12 September 2005 08:46 |
Matt Chapman Messages: 429 Registered: July 2009 |
Senior Member |
|
|
On Sun, 11 Sep 2005 12:37:46 -0700, Barry Kaplan wrote:
> Matt, do the latest ajdt dev builds include aspectj M3? If not, what
> version. Could this info be added the download page?
Hi Barry,
Yes, the latest AJDT dev builds (both 1.2.1 and 1.3.0) contain AspectJ 5
M3a.
We plan to update the version of AspectJ contained in AJDT more
frequently, and when we do this we'll post here, and update the AJDT New
Features page (and post to the AJDT home page, which now offers an RSS
feed).
Regards,
Matt.
--
Matt Chapman
AJDT Development, http://www.eclipse.org/ajdt
|
|
|
Goto Forum:
Current Time: Wed Sep 18 20:50:53 GMT 2024
Powered by FUDForum. Page generated in 0.03716 seconds
|