fix: crash with remote projects
This commit is contained in:
parent
14c909d50e
commit
9135cc6dd6
2 changed files with 8 additions and 3 deletions
|
@ -17,6 +17,11 @@ Changelog structure reference:
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Project
|
||||||
|
- Zig Build tool window crashes when opening remote projects
|
||||||
|
|
||||||
## [20.1.2]
|
## [20.1.2]
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
@ -22,15 +22,15 @@
|
||||||
|
|
||||||
package com.falsepattern.zigbrains.project.steps.ui
|
package com.falsepattern.zigbrains.project.steps.ui
|
||||||
|
|
||||||
import com.falsepattern.zigbrains.shared.coroutine.runModalOrBlocking
|
import com.falsepattern.zigbrains.shared.zigCoroutineScope
|
||||||
import com.intellij.openapi.project.Project
|
import com.intellij.openapi.project.Project
|
||||||
import com.intellij.openapi.wm.ToolWindow
|
import com.intellij.openapi.wm.ToolWindow
|
||||||
import com.intellij.openapi.wm.ToolWindowFactory
|
import com.intellij.openapi.wm.ToolWindowFactory
|
||||||
import com.intellij.platform.ide.progress.ModalTaskOwner
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
class BuildToolWindowFactory: ToolWindowFactory {
|
class BuildToolWindowFactory: ToolWindowFactory {
|
||||||
override fun createToolWindowContent(project: Project, toolWindow: ToolWindow) {
|
override fun createToolWindowContent(project: Project, toolWindow: ToolWindow) {
|
||||||
runModalOrBlocking({ModalTaskOwner.project(project)}, {"BuildToolWindowFactory.createToolWindowContent"}) {
|
project.zigCoroutineScope.launch {
|
||||||
BuildToolWindowContext.create(project, toolWindow)
|
BuildToolWindowContext.create(project, toolWindow)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue