axeon
11/16/2024, 8:49 AMStandaloneAnalysisAPISession
without having to completely rebuild it? The way I tried to do it looks like this:
kotlin
session.project.getService(KotlinPackageProviderFactory::class.java).let { service ->
service.createPackageProvider(
GlobalSearchScope.fileScope(newKtFileFromPsiFileFactory)
).let { provider ->
project.mergePackageProviders(listOf(provider))
}
}
But this doesn't seem to update the session sources. It looks like analyzing a file without attaching a KaModule
to it might not be possible, and I haven’t figured out how attach one either without constructing the said session.
Any insights would be greatly appreciated. Thanks!dimonchik0036
11/19/2024, 2:22 PMyan
11/19/2024, 3:17 PMaxeon
11/19/2024, 3:48 PMMatthieu Stombellini
01/04/2025, 2:59 PMBlockSupport.replaceRange
and Document
functions but hit several obscure errors which I believe are related to the compiler not running a real "full" IntelliJ IDE, so that doesn't sound like a viable solution. It also wouldn't solve the problem of adding entirely new files.