After
I got my plugin dev environment running and debuggable, I’m currently
thinking about extending it by a feature to highlight dynamic methods on imported
Java classes. That is I want to mark all calls to methods, which can’t be
derived from the type of the callee. Example tagging could be underlining.
I
thought about extending the syntax highlighting, but learned that this is
pretty much eclipse built-in stuff and not a good place for it.
Now
I’m looking into GroovyCompiler.java in the core project. My idea was to
analyze the AST after the compile phase and search for all calls to methods. After
that look for the classes of the calless in the classpath of the surrounding project
and verify that the called methods can be found in the callee’s classdef
(or it’s superclass). If not, mark the method call.
Now
I’m wondering if this is a good idea. Better suggestions are welcome. I’m
also wondering if the AST ist the right place to search. I couldn’t find
any functions to collect all method calls from the AST.
Any
advice to approach this problem better?
Cheers,
klaus.