Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » Re: Aspects spanning multiple projects in Eclipse, is it possible?
Re: Aspects spanning multiple projects in Eclipse, is it possible? [message #47214] Tue, 01 February 2005 10:16
Eclipse UserFriend
Originally posted by: mchapman.uk.ibm.com

Hi Ian,

Firstly, for questions relating to using AspectJ in Eclipse, the
eclipse.technology.ajdt newsgroup would be the most appropriate, which I'm
cross-posting to as this topic is probably of interest there.

For questions related to the AspectJ language itself and its use, the
aspectj-users mailing list would be best - it's much less quiet there! See
the URL below for more information:
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Now, what you are trying to do is possible, by using the AspectPath
setting. For some good background info on this, and how it relates to the
InPath and classpath settings, see Adrian's blog entry here:
http://www.aspectprogrammer.org/blogs/adrian/2004/10/three_p aths_sta.html

If you right-click on project foo and select Properties > AspectJ, and
enter something like foo.jar in the output jar field, the class files from
this project will then go into that jar, instead of the bin directory. You
can then go to Property > AspectJ AspectPath of project foo.test and add
foo.jar from project foo.

To confirm what is being woven, you can turn on the following option:
AspectJ Compiler > Other > Output weaving messages to problem view.

As an aside, it seems to me that it would be more natural to be able to
specify the bin directory on the aspectpath, to avoid having to create the
output jar, but this is not currently supported by the compiler. This has
come up before, but I couldn't find it captured in a bug report, so I've
raised one now:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=84122

Regards,

Matt.

On Tue, 01 Feb 2005 00:06:01 +0000, Ian Phillips wrote:
> Is it possible for me to have aspects than span multiple projects in
> eclipse? I'm trying the following scenario but can't see a way to make
> it work:
>
> 1. I have a plugin project foo like so:
> /foo/
> /foo/src/foo/MyClass.java
> /foo/src/foo/MyAspect.aj
> /foo/... [other files like plugin.xml, etc.]
> 2. Now I have my unit tests in a separate plugin project, foo.test, like
> so:
> /foo.test/
> /foo.test/src/foo/test/MyUnitTests.java /foo.test/... [other files
> like plugin.xml, etc.]
>
> I'm trying to write unit tests which test the behaviour of the aspect in
> project foo, but they are not having advice applied to them (because
> foo.test is not in the ajbuild.properties). There doesn't (to me at
> least) seem to be any means of telling the AspectJ compiler to weave the
> files in foo.test as well.
>
> Any ideas?
>
> Also, is this the best place to ask questions? It seems a bit quiet
> around here!
>
> Cheers,
> Ian.

--
Matt Chapman
AJDT Development, http://www.eclipse.org/ajdt
Previous Topic:ajdt_1.2.0M2 content assist does not work
Next Topic:AJDT and Plugin Development
Goto Forum:
  


Current Time: Mon Dec 30 14:45:58 GMT 2024

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

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

Back to the top