Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] [ajdt core] !!!


Is your example based on the reply Mik Kersten posted to your question the other day?  
If you are using an example of how to manipulate the JDT ast - it will not translate directly to manipulating an AspectJ AST - we haven't implemented that functionality. We have an open bug to finish the support.

Andy.
---
Andy Clement
AspectJ Development




Alex Vasc <altvex@xxxxxxxxx>
Sent by: aspectj-dev-bounces@xxxxxxxxxxx

27/05/2005 16:43

Please respond to
Alex Vasc <altvex@xxxxxxxxx>; Please respond to
AspectJ developer discussions <aspectj-dev@xxxxxxxxxxx>

To
aspectj-dev@xxxxxxxxxxx
cc
Subject
[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
_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-dev


Back to the top