[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-dev] [ajdt core] !!!
|
Thanks everybody for the patience, but I´m still having problems with ajdt core.
I´ve got a strange exception:
//-----------------------
Unhandled event loop exception
Reason: org/aspectj/ajdt/internal/compiler/ast/AspectDeclaration
//-----------------------
I´ve tried to get an aspect inside a .java using something like this:
//-----------------------
Iterator itTypes = cu.types().iterator();
while(itTypes.hasNext()) {
Object o = itTypes.next();
if(o instanceof AspectDeclaration) {
MessageDialog.openInformation(null, null,"OK!");
}
}
//-----------------------
where cu is a CompilationUnit and the .java where the plugin runs is:
//-----------------------
public class HelloChild {
public void print(int x) {
System.out.println("Hello! I´m a child! My number is: "+ x);
}
}
aspect World1 {
}
//-----------------------
I did it because the AspectDeclaration extends the TypeDeclaration
from jdt.core.dom. So, I supposed that I could get this element from a
.java file. Is this correct? Any thoughts?! Please, tell me if I´m
doing something stupid! My only itention is to get aspectj elements
from an open file editor.
Best regards!
Alexandre Vasconcelos