2

I am trying to accomplish code generation and analysis of my entire spring boot maven application.

What I want to achieve is

Just like IDEA analyzes the whole project and find dependencies for a class in the editor ie if a class is using:

class Simple {
    public static void main(String[] args) {
        StringUtils.rpad(...)
    }
}

If I click on StringUtils it takes me to the source code of the class in spring jar that is included by the maven.

In similar fashion, I would like the JavaParser to analyze the whole project and build some kind of index or whatever that IDEA creates. And then I can discover all the related jars and class files. That will allow me to manipulate / refactor some classes.

I tried to do similar thing for Eclipse AST / JDT. Unfortunately, this is only possible if I create an Eclipse plugin, in that case Eclipse plugin creates a project which have the idea of the whole project and its dependencies.

In my case I don't want to create Eclipse or IDEA plugin. The reason is that I want to create some kind of script / tool that can be run from command line. So I need standalone support from a code generator like JavaParser.

user1539343
  • 1,569
  • 6
  • 28
  • 45
  • Hi, were you able to solve this? – Saif Aug 14 '22 at 03:59
  • Not yet. But there is a thing called Symbol parser or something like that which looks relevant. You can explore and update me. I would do the same once time permits. – user1539343 Oct 06 '22 at 14:48

0 Answers0