Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » add the aspectj nature in my plugin
add the aspectj nature in my plugin [message #61510] Tue, 31 January 2006 17:56 Go to next message
Luca Zenti is currently offline Luca ZentiFriend
Messages: 4
Registered: July 2009
Junior Member
Hi, I'm developing an eclipse plugin that doesn't use aspectj on its own
classes but needs to weave the classes of the projects it is applied to
when deployed (I have a custom nature). All the aspects I need are
contained in the plugin itself.

The first thing I tried is to add the aspectj nature to the project when I
add my own one but I have to use an internal ajdt class (AspectJUtils) and
it does the job asynchronously, hence I can't do the rest of the job in
the same action.

Copy and paste the code from the internal classes of ajdt doesn't appear
to be a good idea, so any suggestion?

What exactly is a "aspectj-enabled plugin"? Doesn't seem to fit my problem
from the docs, but I can surely miss something.

Thanks a lot in advance.

Luca.
Re: add the aspectj nature in my plugin [message #61566 is a reply to message #61510] Wed, 01 February 2006 11:15 Go to previous messageGo to next message
Matt Chapman is currently offline Matt ChapmanFriend
Messages: 429
Registered: July 2009
Senior Member
Hi Luca,

So you want to be able to programmatically convert a Java project to an
AspectJ project? It sounds like the
internal AJDTUtils.addAspectJNature(project) method is the one you want. I
suggest you try calling this, and if it is what you want then raise a
bugzilla report requesting public API for this. Our approach is to
start with everything as internal API, and then add things to
the public API as required. This method sounds like a good candidate to
make public for AJDT 1.4.

Regards,

Matt.

On Tue, 31 Jan 2006 17:56:51 +0000, Luca Zenti wrote:

> Hi, I'm developing an eclipse plugin that doesn't use aspectj on its own
> classes but needs to weave the classes of the projects it is applied to
> when deployed (I have a custom nature). All the aspects I need are
> contained in the plugin itself.
>
> The first thing I tried is to add the aspectj nature to the project when I
> add my own one but I have to use an internal ajdt class (AspectJUtils) and
> it does the job asynchronously, hence I can't do the rest of the job in
> the same action.
>
> Copy and paste the code from the internal classes of ajdt doesn't appear
> to be a good idea, so any suggestion?
>
> What exactly is a "aspectj-enabled plugin"? Doesn't seem to fit my problem
> from the docs, but I can surely miss something.
>
> Thanks a lot in advance.
>
> Luca.
Re: add the aspectj nature in my plugin [message #61610 is a reply to message #61566] Fri, 03 February 2006 10:41 Go to previous message
Luca Zenti is currently offline Luca ZentiFriend
Messages: 4
Registered: July 2009
Junior Member
Hi Matt,
thanks for the reply, it is exactly what I need to do. I tried to use the
AJDTUtils.addAspectjNature method despite it is internal (it's worth a
warning...) but the problem is that it just calls method
internal_addAspectJNature asynchronously. I need to add my own nature
after the aspectj nature has been added since it puts a jar file into the
aspectPath of the project, hence the call should be synchronous.
I solved my problem by copy and paste some of the code of the
internal_addAspectJNature method, it is not really a killer solution, but
it works. I will submit a new bug asking for this last method (or another
method that simply calls this one) to be public.

Thanks again,
Luca.
Re: add the aspectj nature in my plugin [message #592061 is a reply to message #61510] Wed, 01 February 2006 11:15 Go to previous message
Matt Chapman is currently offline Matt ChapmanFriend
Messages: 429
Registered: July 2009
Senior Member
Hi Luca,

So you want to be able to programmatically convert a Java project to an
AspectJ project? It sounds like the
internal AJDTUtils.addAspectJNature(project) method is the one you want. I
suggest you try calling this, and if it is what you want then raise a
bugzilla report requesting public API for this. Our approach is to
start with everything as internal API, and then add things to
the public API as required. This method sounds like a good candidate to
make public for AJDT 1.4.

Regards,

Matt.

On Tue, 31 Jan 2006 17:56:51 +0000, Luca Zenti wrote:

> Hi, I'm developing an eclipse plugin that doesn't use aspectj on its own
> classes but needs to weave the classes of the projects it is applied to
> when deployed (I have a custom nature). All the aspects I need are
> contained in the plugin itself.
>
> The first thing I tried is to add the aspectj nature to the project when I
> add my own one but I have to use an internal ajdt class (AspectJUtils) and
> it does the job asynchronously, hence I can't do the rest of the job in
> the same action.
>
> Copy and paste the code from the internal classes of ajdt doesn't appear
> to be a good idea, so any suggestion?
>
> What exactly is a "aspectj-enabled plugin"? Doesn't seem to fit my problem
> from the docs, but I can surely miss something.
>
> Thanks a lot in advance.
>
> Luca.
Re: add the aspectj nature in my plugin [message #592078 is a reply to message #61566] Fri, 03 February 2006 10:41 Go to previous message
Luca Zenti is currently offline Luca ZentiFriend
Messages: 4
Registered: July 2009
Junior Member
Hi Matt,
thanks for the reply, it is exactly what I need to do. I tried to use the
AJDTUtils.addAspectjNature method despite it is internal (it's worth a
warning...) but the problem is that it just calls method
internal_addAspectJNature asynchronously. I need to add my own nature
after the aspectj nature has been added since it puts a jar file into the
aspectPath of the project, hence the call should be synchronous.
I solved my problem by copy and paste some of the code of the
internal_addAspectJNature method, it is not really a killer solution, but
it works. I will submit a new bug asking for this last method (or another
method that simply calls this one) to be public.

Thanks again,
Luca.
Previous Topic:Which version for Websphere WSAD
Next Topic:Args evaluation in non-proceeding around()
Goto Forum:
  


Current Time: Thu Apr 25 17:06:50 GMT 2024

Powered by FUDForum. Page generated in 0.02408 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top