Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forumsadd the aspectj nature in my plugin
https://www.eclipse.org/forums/index.php/mv/msg/19161/61510/#msg_61510
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.]]>Luca Zenti2006-01-31T17:56:51-00:00Re: add the aspectj nature in my plugin
https://www.eclipse.org/forums/index.php/mv/msg/19161/61566/#msg_61566
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.]]>Matt Chapman2006-02-01T11:15:34-00:00Re: add the aspectj nature in my plugin
https://www.eclipse.org/forums/index.php/mv/msg/19161/592061/#msg_592061
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.]]>Matt Chapman2006-02-01T11:15:34-00:00Re: add the aspectj nature in my plugin
https://www.eclipse.org/forums/index.php/mv/msg/19161/61610/#msg_61610
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.]]>Luca Zenti2006-02-03T10:41:51-00:00Re: add the aspectj nature in my plugin
https://www.eclipse.org/forums/index.php/mv/msg/19161/592078/#msg_592078
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.