Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » [Newbie] Aspect in one project not recognized in another
[Newbie] Aspect in one project not recognized in another [message #48585] Tue, 22 February 2005 18:16
Eclipse UserFriend
Originally posted by: sinleeh.hotmail.com

Dear all,

Is there any way to make an aspect defined in one plugin project capture
pointcuts in another project? See below for a quasi-example of what I
observed with AJDT

PROJECTA (plugin project)
class Parent { public void printHello() {} }

aspect myAspect {
before() : execution (public void Parent+.printHello()) {
System.out.println("Before saying hello");
}
}

PROJECTB (plugin project)
Note: in plugin.xml, projectA is listed as a plugin dependency;

class Child extends Parent {
static public void main(String[] args) {
new Child.printHello();
}

Currently, running child.main(..) will not see the line
"Before saying hello"
because myAspect is defined in a different project. Same thing happens if
I use a JUNIT plugin test and convert Child.main() into a test case.

Is it possible to make myAspect aware of the child?

Many thanks and best regards,
Sinlee
Previous Topic:Where are inpath settings stored?
Next Topic:[Newbie] Aspect in one project not recognized in another
Goto Forum:
  


Current Time: Thu Apr 25 14:06:58 GMT 2024

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

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

Back to the top