I would like to use the Workspace Model instead of...
# intellij-plugins
t
I would like to use the Workspace Model instead of the Project Model in my plugin. But i still not able to get the output path where the classes are compiled for a module. I am using following Project Model code to get the classpath for a module:
Copy code
val rm = ModuleRootManager.getInstance(module)
val classPath = rm
    .orderEntries()
    .classesRoots
    .map { it.presentableUrl }
How could i get it in Workspace Model. I am already be able to get the path to all dependencies but i am missing the path to the classes generated by this module itself:
Copy code
module.dependencies
    .filterIsInstance<LibraryDependency>()
    .mapNotNull { currentSnapshot.resolve(it.library) }
    .mapNotNull { library ->
        library.roots.find {
            it.type == LibraryRootTypeId.COMPILED
        }?.url?.presentableUrl
    }
My experiments with module.contentRoots and module.sourceRoots show that this do not contain the correct path just some intermediate folders where resources are generated.