Home » Language IDEs » AspectJ » AspectJ model
AspectJ model [message #55351] |
Sun, 24 July 2005 02:34  |
Eclipse User |
|
|
|
Originally posted by: orenmish.hotmail.com
Hi,
I'm interested in implementing a builder that will parse .aj file and then
act upon the content of its pointcuts and advices.
1) Should my starting point be ICompilationUnit?
2) How are aspects, pointcuts and advices represented?
Thanks,
Oren.
|
|
| | |
Re: AspectJ model [message #55538 is a reply to message #55457] |
Tue, 26 July 2005 06:37   |
Eclipse User |
|
|
|
Originally posted by: mchapman.uk.ibm.com
On Tue, 26 Jul 2005 04:25:11 +0000, Oren Mishali wrote:
> The builder is implemented as an eclipse plugin. Thanks for you help,
> I'll take a look at AJDT core.
Just to get you started in the right direction:
In the org.eclipse.ajdt.core plugin, you can do:
AJCompilationUnitManager.getAJCompilationUnit(IFile file) to get an
AJCompilationUnit object for a .aj file. This will contain things like
instances of AdviceElement, PointcutElement etc.
For slightly higher level functionality, look at the AJModel class in the
same plugin. Given an IJavaElement (be it a method, class, or some advice
etc) you can query which IJavaElements it is related to, with the possible
relationships being things like "advises", "advised by", "declared on" etc
(see AJRelationshipManager for a list).
Hope that helps,
Matt.
|
|
| |
Re: AspectJ model [message #55592 is a reply to message #55566] |
Tue, 26 July 2005 09:14  |
Eclipse User |
|
|
|
Originally posted by: mchapman.uk.ibm.com
On Tue, 26 Jul 2005 12:19:47 +0000, Oren Mishali wrote:
> I have another problem...
> I'm using eclipse 3.0.1 with AJDT 1.1.12 (Can't upgrade to 1.2 since I'm
> using AJEER which requires AJDT 1.1.12).
> I understand that the classes that you were talking about exist only in
> 1.2 (right?)
Correct.
> Does 1.1.12 provides classes for model manipulation?
Not in AJDT itself, but there are some classes down in AspectJ which were
there back then. There has been some discussion about these on the
aspectj-dev list, for example:
http://dev.eclipse.org/mhonarc/lists/aspectj-dev/msg01637.ht ml
> If not, is it possible to use org.eclipse.ajdt.core from 1.2 along with
> 1.1.12?
No, too much has changed.
I believe Martin Lippert is working on porting AJEER to work with AJDT 1.2.
Regards,
Matt.
|
|
|
Re: AspectJ model [message #589577 is a reply to message #55351] |
Mon, 25 July 2005 10:17  |
Eclipse User |
|
|
|
On Sun, 24 Jul 2005 06:34:08 +0000, Oren Mishali wrote:
> I'm interested in implementing a builder that will parse .aj file and then
> act upon the content of its pointcuts and advices.
>
> 1) Should my starting point be ICompilationUnit?
> 2) How are aspects, pointcuts and advices represented?
Hi Oren,
Are you implementing this builder as an Eclipse plugin? If so, you can
build on top of the AJDT core plugin, and get the information for
aspects from there. Otherwise you'll have to call the parser from the
AspectJ compiler directly.
Regards,
Matt.
|
|
| |
Re: AspectJ model [message #589647 is a reply to message #55457] |
Tue, 26 July 2005 06:37  |
Eclipse User |
|
|
|
On Tue, 26 Jul 2005 04:25:11 +0000, Oren Mishali wrote:
> The builder is implemented as an eclipse plugin. Thanks for you help,
> I'll take a look at AJDT core.
Just to get you started in the right direction:
In the org.eclipse.ajdt.core plugin, you can do:
AJCompilationUnitManager.getAJCompilationUnit(IFile file) to get an
AJCompilationUnit object for a .aj file. This will contain things like
instances of AdviceElement, PointcutElement etc.
For slightly higher level functionality, look at the AJModel class in the
same plugin. Given an IJavaElement (be it a method, class, or some advice
etc) you can query which IJavaElements it is related to, with the possible
relationships being things like "advises", "advised by", "declared on" etc
(see AJRelationshipManager for a list).
Hope that helps,
Matt.
|
|
|
Re: AspectJ model [message #589658 is a reply to message #55538] |
Tue, 26 July 2005 08:19  |
Eclipse User |
|
|
|
Hi again Matt,
Thanks for your help.
I have another problem...
I'm using eclipse 3.0.1 with AJDT 1.1.12 (Can't upgrade to 1.2 since I'm
using AJEER which requires AJDT 1.1.12).
I understand that the classes that you were talking about exist only in
1.2 (right?)
Does 1.1.12 provides classes for model manipulation?
If not, is it possible to use org.eclipse.ajdt.core from 1.2 along with
1.1.12?
Thanks,
Oren.
|
|
|
Re: AspectJ model [message #589665 is a reply to message #55566] |
Tue, 26 July 2005 09:14  |
Eclipse User |
|
|
|
On Tue, 26 Jul 2005 12:19:47 +0000, Oren Mishali wrote:
> I have another problem...
> I'm using eclipse 3.0.1 with AJDT 1.1.12 (Can't upgrade to 1.2 since I'm
> using AJEER which requires AJDT 1.1.12).
> I understand that the classes that you were talking about exist only in
> 1.2 (right?)
Correct.
> Does 1.1.12 provides classes for model manipulation?
Not in AJDT itself, but there are some classes down in AspectJ which were
there back then. There has been some discussion about these on the
aspectj-dev list, for example:
http://dev.eclipse.org/mhonarc/lists/aspectj-dev/msg01637.ht ml
> If not, is it possible to use org.eclipse.ajdt.core from 1.2 along with
> 1.1.12?
No, too much has changed.
I believe Martin Lippert is working on porting AJEER to work with AJDT 1.2.
Regards,
Matt.
|
|
|
Goto Forum:
Current Time: Thu May 08 08:56:19 EDT 2025
Powered by FUDForum. Page generated in 0.06625 seconds
|