Closed Artur- closed 3 weeks ago
It can be achieved using:
ModuleManager.getInstance(project).modules.forEach { module: Module ->
val moduleRootManager = ModuleRootManager.getInstance(module)
moduleRootManager.getSourceRoots(JavaSourceRootType.SOURCE)
moduleRootManager.getSourceRoots(JavaSourceRootType.TEST_SOURCE)
}
For copilot to be able to find/handle files in a multi module project, it needs to know where to look for sources. The command should return a list of all source folders (absolute path) so that all ”main” sources are first (most likely to contain what copilot is looking for) and then all ”test” source folders