|JavaParser works great to analyse java code and provides a way to process a source directory in one go. But it was lacking a way to analyse a project, which might consists of multiple source directories.
Previously the answer was to manually create all SourceRoots, which you could then analyse. Let’s review the following example for the JavaParser repository. In order to parse all files within the repository, you had to manually define the roots of each module and then create a SourceRoot with each source root, which you could then process further.
We needed a way to achieve this automatically, saving everyone the trouble of reinventing the wheel.
The following examples show how to initialise the ProjectRoot:
Written by Daan Schipper