Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » Cross Project reference
Cross Project reference [message #63053] Tue, 21 March 2006 14:34 Go to next message
Eclipse User
Originally posted by: satish.subramaniam.rediffmail.com

Some clarifactions required using aspectJ and AJDT.

Assume that I two projects:

Project A - AspectJ project that contains only the aspects.
Project B - Is a normal java project.

While writing the aspects in proj.A, my aspects will need to make some
references to project B java files E.g: Load some configuration. How can
this be achieved? I tried by adding the project B to the java build path
(under projects) of the aspectJ project A. Now i can access the classes of
project B in the aspect, but when i run my main class using the aspect-J
load time weaving option - my aspects don't get invoked. My main class
that i run is in the java project B. how can this be achieved ?
Re: Cross Project reference [message #63063 is a reply to message #63053] Tue, 21 March 2006 16:02 Go to previous messageGo to next message
Sian January is currently offline Sian January
Messages: 83
Registered: July 2009
Member
Hi Satish,

You need to add Project A to the load-time weaving aspectpath, which is
configured through a tab called "LTW Aspectpath" in the run dialog.

Sian

Satish wrote:
> Some clarifactions required using aspectJ and AJDT.
>
> Assume that I two projects:
>
> Project A - AspectJ project that contains only the aspects.
> Project B - Is a normal java project.
>
> While writing the aspects in proj.A, my aspects will need to make some
> references to project B java files E.g: Load some configuration. How can
> this be achieved? I tried by adding the project B to the java build path
> (under projects) of the aspectJ project A. Now i can access the classes
> of project B in the aspect, but when i run my main class using the
> aspect-J load time weaving option - my aspects don't get invoked. My
> main class that i run is in the java project B. how can this be achieved ?
>
Re: Cross Project reference [message #63169 is a reply to message #63053] Thu, 30 March 2006 00:09 Go to previous messageGo to next message
Don Nelson is currently offline Don Nelson
Messages: 21
Registered: July 2009
Junior Member
Actually, I am having the same problem. I saw Sian's reply, but I don't
see any such "LTW Aspectpath" in any properties anywhere. I do see an
"AspectJ aspect path" in the project properties, where I can add class
folders. I have added the class folders of the two projects I want to
weave my aspect into, and it looks like the correct classes are being
woven when I run the builder. However, my aspect is never invoked.
Additional help here would be great.

Don

Satish wrote:
> Some clarifactions required using aspectJ and AJDT.
>
> Assume that I two projects:
>
> Project A - AspectJ project that contains only the aspects.
> Project B - Is a normal java project.
>
> While writing the aspects in proj.A, my aspects will need to make some
> references to project B java files E.g: Load some configuration. How can
> this be achieved? I tried by adding the project B to the java build path
> (under projects) of the aspectJ project A. Now i can access the classes
> of project B in the aspect, but when i run my main class using the
> aspect-J load time weaving option - my aspects don't get invoked. My
> main class that i run is in the java project B. how can this be achieved ?
>
Re: Cross Project reference [message #63192 is a reply to message #63169] Thu, 30 March 2006 07:56 Go to previous messageGo to next message
Eclipse User
Originally posted by: hawkinsh.uk.ibm.com

The "LTW Aspectpath" tab is in the run configuration for an "AspectJ
Load-Time weaving application". So, you need to do run > run as and select
the aspectj load-time weaving application configuration to run your
program.
Re: Cross Project reference [message #63216 is a reply to message #63192] Thu, 30 March 2006 15:02 Go to previous messageGo to next message
Don Nelson is currently offline Don Nelson
Messages: 21
Registered: July 2009
Junior Member
Thanks, Helen. This leads me to the question of how in the world would
I run this in an application server in a production environment???

Helen Hawkins wrote:
> The "LTW Aspectpath" tab is in the run configuration for an "AspectJ
> Load-Time weaving application". So, you need to do run > run as and
> select the aspectj load-time weaving application configuration to run
> your program.
>
Re: Cross Project reference [message #63331 is a reply to message #63216] Fri, 31 March 2006 09:18 Go to previous message
Eclipse User
Originally posted by: hawkinsh.uk.ibm.com

Hi Don,

The on-line documentation should help explain how you can run this in a
production environment
http://www.eclipse.org/aspectj/doc/released/devguide/ltw.htm l.

Thanks, Helen
Re: Cross Project reference [message #592636 is a reply to message #63053] Tue, 21 March 2006 16:02 Go to previous message
Sian January is currently offline Sian January
Messages: 83
Registered: July 2009
Member
Hi Satish,

You need to add Project A to the load-time weaving aspectpath, which is
configured through a tab called "LTW Aspectpath" in the run dialog.

Sian

Satish wrote:
> Some clarifactions required using aspectJ and AJDT.
>
> Assume that I two projects:
>
> Project A - AspectJ project that contains only the aspects.
> Project B - Is a normal java project.
>
> While writing the aspects in proj.A, my aspects will need to make some
> references to project B java files E.g: Load some configuration. How can
> this be achieved? I tried by adding the project B to the java build path
> (under projects) of the aspectJ project A. Now i can access the classes
> of project B in the aspect, but when i run my main class using the
> aspect-J load time weaving option - my aspects don't get invoked. My
> main class that i run is in the java project B. how can this be achieved ?
>
Re: Cross Project reference [message #592702 is a reply to message #63053] Thu, 30 March 2006 00:09 Go to previous message
Don Nelson is currently offline Don Nelson
Messages: 21
Registered: July 2009
Junior Member
Actually, I am having the same problem. I saw Sian's reply, but I don't
see any such "LTW Aspectpath" in any properties anywhere. I do see an
"AspectJ aspect path" in the project properties, where I can add class
folders. I have added the class folders of the two projects I want to
weave my aspect into, and it looks like the correct classes are being
woven when I run the builder. However, my aspect is never invoked.
Additional help here would be great.

Don

Satish wrote:
> Some clarifactions required using aspectJ and AJDT.
>
> Assume that I two projects:
>
> Project A - AspectJ project that contains only the aspects.
> Project B - Is a normal java project.
>
> While writing the aspects in proj.A, my aspects will need to make some
> references to project B java files E.g: Load some configuration. How can
> this be achieved? I tried by adding the project B to the java build path
> (under projects) of the aspectJ project A. Now i can access the classes
> of project B in the aspect, but when i run my main class using the
> aspect-J load time weaving option - my aspects don't get invoked. My
> main class that i run is in the java project B. how can this be achieved ?
>
Re: Cross Project reference [message #592716 is a reply to message #63169] Thu, 30 March 2006 07:56 Go to previous message
Eclipse User
Originally posted by: hawkinsh.uk.ibm.com

The "LTW Aspectpath" tab is in the run configuration for an "AspectJ
Load-Time weaving application". So, you need to do run > run as and select
the aspectj load-time weaving application configuration to run your
program.
Re: Cross Project reference [message #592718 is a reply to message #63192] Thu, 30 March 2006 15:02 Go to previous message
Don Nelson is currently offline Don Nelson
Messages: 21
Registered: July 2009
Junior Member
Thanks, Helen. This leads me to the question of how in the world would
I run this in an application server in a production environment???

Helen Hawkins wrote:
> The "LTW Aspectpath" tab is in the run configuration for an "AspectJ
> Load-Time weaving application". So, you need to do run > run as and
> select the aspectj load-time weaving application configuration to run
> your program.
>
Re: Cross Project reference [message #592793 is a reply to message #63216] Fri, 31 March 2006 09:18 Go to previous message
Eclipse User
Originally posted by: hawkinsh.uk.ibm.com

Hi Don,

The on-line documentation should help explain how you can run this in a
production environment
http://www.eclipse.org/aspectj/doc/released/devguide/ltw.htm l

Thanks, Helen
Previous Topic:Using ajdt in RCP
Next Topic:Exception: Unable to create this part due to an internal error. Reason for the failure: Editor could
Goto Forum:
  


Current Time: Thu Oct 30 15:17:23 GMT 2014

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

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