Closed apotterri closed 6 months ago
Currently, the package list also includes packages contained in resource folders. Filtering to only allow packages located in source code folders should be possible.
I don't think we could collapse a.b.c.*
itno a.b.c
(e.g. org.finos.waltz.*
into org.finos.waltz
) because there may be projects which share a common package prefix with libraries.
Ok, I'll look at filtering out resource folders.
Re collapsing packages: my example was wrong. We wouldn't want to collapse the path
entries in this case. We'd only want to do it if they also contained the common prefix itself, e.g. org.finos
, or org.finos.waltz
, indicating that there are classes in that package.
@apotterri Starting point to filter the packages would be appland.execution.AppMapJavaPackageConfig#findTopLevelPackages
and probably appland.execution.AppMapJavaPackageConfig#collectSourceRootsWithDependencies
.
I haven't worked with the Java project model (source folders, resource folders, etc), but these methods seem most promising to me: ModuleRootManager.getInstance(module).getContentEntries()[...].getSource*()
.
What answer do you get if you ask Navie how to implement this?
On Fri, May 3, 2024 at 03:18 Joachim Ansorg @.***> wrote:
@apotterri https://github.com/apotterri Starting point to filter the packages would be appland.execution.AppMapJavaPackageConfig#findTopLevelPackages and probably appland.execution.AppMapJavaPackageConfig#collectSourceRootsWithDependencies . I haven't worked with the Java project model (source folders, resource folders, etc), but these methods seem most promising to me: ModuleRootManager.getInstance(module).getContentEntries()[...].getSource*() .
— Reply to this email directly, view it on GitHub https://github.com/getappmap/appmap-intellij-plugin/issues/690#issuecomment-2092446855, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAVC64PKSFSNEYUEUXCR4LZAM26FAVCNFSM6AAAAABHCVPSHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJSGQ2DMOBVGU . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Sometimes there are
path
entries added for non-application packages.For example, the plugin generates this
appmap.yml
for waltz:It should really have no more than
and, ideally, even these would be collapsed to their common prefix, i.e.
- path: "org.finos.waltz"
.