Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Help with compiler and AST needed
Help with compiler and AST needed [message #523418] Fri, 26 March 2010 07:50
Eclipse UserFriend
Hello,

I am writing a plugin that hooks into the jdt compiler process. What I basically want to do is this:

I do have an annotation that marks a method with a certain type. Now I want to check each caller of this method, if he adheres to the convention defined by the annotation. Example

@ValidType(type=String.class)
void a(Object o) {}

void b() {
a("Hello"); // is correct
a(1); // is not correct
}

What I have accomplished so far, is that I am able to find all locations calling my marked method. I now want to analyze the contents of the method to be able to tell, if the caller of this method adheres to the calling convention defined by the annotation. Therefore I need to get the ASTNode for this method from the ResolvedSourceMethod element. And I don't know how to do this. If anyone could point me in the right direction would be great!

Greetings
Previous Topic:Extending java syntax coloring
Next Topic:Help SWT table and Database
Goto Forum:
  


Current Time: Wed Mar 26 11:45:13 EDT 2025

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

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

Back to the top