Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-dev] ASTNode that corresponds to a IJavaElement

Dear all,

I need to implement a listener for addition of method calls in the java source code (e.g. adding a line like: myObject.toString(); ). Since I was not able to find any listener Interface with similar behavior in the AST interfaces, I"m using IJavaChangeListener and checking every time if a new ASTNode of type MethodInvocation has been added to the CompilationUnit of the edited java class. This is quite inefficient. So my question is: - Is there any standard why to listen to modifications of an ASTNode in particular CompilationUnits? - If not: is it possible to get from the whole CompilationUnit only the subtree of a IMethod?

Thank you for you support
Walid


Back to the top