Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » How do I apply an aspect using AJDT???
How do I apply an aspect using AJDT??? [message #67103] Thu, 05 October 2006 14:00 Go to next message
Eclipse UserFriend
Originally posted by: owencorpening.yahoo.com

I have a helloworld in one package and an aspect in another. I have a
build.bat that builds and runs it, and I get the logging I expect from the
aspect. I do "create project from existing source" in eclipse - and none
of the methods in helloworld are advised .... I honestly can't figure out
how to make them "be advised".

Here is the project:
com.howdy.helloworld.java
com.tracing.HelloAspect.aj

This must be simple ... next I will want to just add an aspect jar and
apply it .... I couldn't figure out how to do any of this from watching
the demo's, which is evidently the only documentation on AJDT.

here is the .bat file in case that matters:

set classpath=%classpath%;.
ajc com\howdy\*.java com\tracing\HelloAspect.aj
java com.howdy.HelloWorld

Thanks,
owen
Re: How do I apply an aspect using AJDT??? [message #67113 is a reply to message #67103] Thu, 05 October 2006 14:47 Go to previous messageGo to next message
Matt Chapman is currently offline Matt ChapmanFriend
Messages: 429
Registered: July 2009
Senior Member
Hi Owen,

Firstly, there is plenty of documentation for AJDT available in the
Eclipse help system: Help > Help Contents > AspectJ Development User
Guide. (I see this is only available after installing AJDT, not from
the website - I'll look into adding it there).

Building using ajc from a bat file is only really suitable for use
outside eclipse. For use inside Eclipse you need to create an AspectJ
project (or convert a Java project).

Regards,

Matt.

Owen Corpening wrote:
> I have a helloworld in one package and an aspect in another. I have a
> build.bat that builds and runs it, and I get the logging I expect from
> the aspect. I do "create project from existing source" in eclipse - and
> none of the methods in helloworld are advised .... I honestly can't
> figure out how to make them "be advised".
>
> Here is the project:
> com.howdy.helloworld.java
> com.tracing.HelloAspect.aj
>
> This must be simple ... next I will want to just add an aspect jar and
> apply it .... I couldn't figure out how to do any of this from watching
> the demo's, which is evidently the only documentation on AJDT.
>
> here is the .bat file in case that matters:
>
> set classpath=%classpath%;.
> ajc com\howdy\*.java com\tracing\HelloAspect.aj
> java com.howdy.HelloWorld
>
> Thanks,
> owen
>
Re: How do I apply an aspect using AJDT??? [message #67121 is a reply to message #67113] Thu, 05 October 2006 17:41 Go to previous message
Eclipse UserFriend
Originally posted by: owencorpening.yahoo.com

I hadn't even thought to look in "help" for the docs, I never saw any
reference to any docs elsewhere, thanks.

The fundamental answer seems to have been to add the aspect to the
aspectPath under project properties ...

thanks again,
owen

Matt Chapman wrote:

> Hi Owen,

> Firstly, there is plenty of documentation for AJDT available in the
> Eclipse help system: Help > Help Contents > AspectJ Development User
> Guide. (I see this is only available after installing AJDT, not from
> the website - I'll look into adding it there).

> Building using ajc from a bat file is only really suitable for use
> outside eclipse. For use inside Eclipse you need to create an AspectJ
> project (or convert a Java project).

> Regards,

> Matt.

> Owen Corpening wrote:
>> I have a helloworld in one package and an aspect in another. I have a
>> build.bat that builds and runs it, and I get the logging I expect from
>> the aspect. I do "create project from existing source" in eclipse - and
>> none of the methods in helloworld are advised .... I honestly can't
>> figure out how to make them "be advised".
>>
>> Here is the project:
>> com.howdy.helloworld.java
>> com.tracing.HelloAspect.aj
>>
>> This must be simple ... next I will want to just add an aspect jar and
>> apply it .... I couldn't figure out how to do any of this from watching
>> the demo's, which is evidently the only documentation on AJDT.
>>
>> here is the .bat file in case that matters:
>>
>> set classpath=%classpath%;.
>> ajc comhowdy*.java comtracingHelloAspect.aj
>> java com.howdy.HelloWorld
>>
>> Thanks,
>> owen
>>
Re: How do I apply an aspect using AJDT??? [message #594880 is a reply to message #67103] Thu, 05 October 2006 14:47 Go to previous message
Matt Chapman is currently offline Matt ChapmanFriend
Messages: 429
Registered: July 2009
Senior Member
Hi Owen,

Firstly, there is plenty of documentation for AJDT available in the
Eclipse help system: Help > Help Contents > AspectJ Development User
Guide. (I see this is only available after installing AJDT, not from
the website - I'll look into adding it there).

Building using ajc from a bat file is only really suitable for use
outside eclipse. For use inside Eclipse you need to create an AspectJ
project (or convert a Java project).

Regards,

Matt.

Owen Corpening wrote:
> I have a helloworld in one package and an aspect in another. I have a
> build.bat that builds and runs it, and I get the logging I expect from
> the aspect. I do "create project from existing source" in eclipse - and
> none of the methods in helloworld are advised .... I honestly can't
> figure out how to make them "be advised".
>
> Here is the project:
> com.howdy.helloworld.java
> com.tracing.HelloAspect.aj
>
> This must be simple ... next I will want to just add an aspect jar and
> apply it .... I couldn't figure out how to do any of this from watching
> the demo's, which is evidently the only documentation on AJDT.
>
> here is the .bat file in case that matters:
>
> set classpath=%classpath%;.
> ajc com\howdy\*.java com\tracing\HelloAspect.aj
> java com.howdy.HelloWorld
>
> Thanks,
> owen
>
Re: How do I apply an aspect using AJDT??? [message #594895 is a reply to message #67113] Thu, 05 October 2006 17:41 Go to previous message
Eclipse UserFriend
Originally posted by: owencorpening.yahoo.com

I hadn't even thought to look in "help" for the docs, I never saw any
reference to any docs elsewhere, thanks.

The fundamental answer seems to have been to add the aspect to the
aspectPath under project properties ...

thanks again,
owen

Matt Chapman wrote:

> Hi Owen,

> Firstly, there is plenty of documentation for AJDT available in the
> Eclipse help system: Help > Help Contents > AspectJ Development User
> Guide. (I see this is only available after installing AJDT, not from
> the website - I'll look into adding it there).

> Building using ajc from a bat file is only really suitable for use
> outside eclipse. For use inside Eclipse you need to create an AspectJ
> project (or convert a Java project).

> Regards,

> Matt.

> Owen Corpening wrote:
>> I have a helloworld in one package and an aspect in another. I have a
>> build.bat that builds and runs it, and I get the logging I expect from
>> the aspect. I do "create project from existing source" in eclipse - and
>> none of the methods in helloworld are advised .... I honestly can't
>> figure out how to make them "be advised".
>>
>> Here is the project:
>> com.howdy.helloworld.java
>> com.tracing.HelloAspect.aj
>>
>> This must be simple ... next I will want to just add an aspect jar and
>> apply it .... I couldn't figure out how to do any of this from watching
>> the demo's, which is evidently the only documentation on AJDT.
>>
>> here is the .bat file in case that matters:
>>
>> set classpath=%classpath%;.
>> ajc comhowdy*.java comtracingHelloAspect.aj
>> java com.howdy.HelloWorld
>>
>> Thanks,
>> owen
>>
Previous Topic:How do I apply an aspect using AJDT???
Next Topic:How I can weave an aspect inside a .jar from eclipse
Goto Forum:
  


Current Time: Fri Dec 19 08:43:08 GMT 2014

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

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