File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/main/kotlin/platform/mcp/vanillagradle Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 2121package com.demonwav.mcdev.platform.mcp.vanillagradle
2222
2323import com.demonwav.mcdev.platform.mcp.gradle.tooling.vanillagradle.VanillaGradleModel
24+ import com.intellij.openapi.application.runReadAction
2425import com.intellij.openapi.externalSystem.model.DataNode
2526import com.intellij.openapi.externalSystem.model.project.ModuleData
2627import org.gradle.tooling.model.idea.IdeaModule
@@ -34,7 +35,9 @@ class VanillaGradleProjectResolverExtension : AbstractProjectResolverExtension()
3435 override fun getToolingExtensionsClasses () = extraProjectModelClasses
3536
3637 override fun populateModuleExtraModels (gradleModule : IdeaModule , ideModule : DataNode <ModuleData >) {
37- val vgData = resolverCtx.getExtraProject(gradleModule, VanillaGradleModel ::class .java)
38+ val vgData = runReadAction {
39+ resolverCtx.getExtraProject(gradleModule, VanillaGradleModel ::class .java)
40+ }
3841 if (vgData != null && vgData.hasVanillaGradle()) {
3942 val gradleProjectPath = gradleModule.gradleProject.projectIdentifier.projectPath
4043 val suffix = if (gradleProjectPath.endsWith(' :' )) " " else " :"
You can’t perform that action at this time.
0 commit comments