[Newbie] Aspect in one project not recognized in another [message #48585] |
Tue, 22 February 2005 18:16 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.02539 seconds