mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 15:06:56 +07:00
IJPL-149878 IJent WSL FS: show VM options dialogs at most once
GitOrigin-RevId: 5afb5390988dc91962ff39247332a1a30541ccd6
This commit is contained in:
committed by
intellij-monorepo-bot
parent
98845870c6
commit
941ea922df
@@ -23,6 +23,7 @@ import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import org.jetbrains.annotations.VisibleForTesting
|
||||
import java.io.IOException
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
import kotlin.concurrent.thread
|
||||
|
||||
@VisibleForTesting
|
||||
@@ -133,10 +134,15 @@ object IjentWslNioFsVmOptionsSetter {
|
||||
|
||||
internal class ApplicationListener : ApplicationActivationListener {
|
||||
@Service
|
||||
private class ServiceScope(coroutineScope: CoroutineScope) : CoroutineScope by coroutineScope
|
||||
private class ServiceScope(coroutineScope: CoroutineScope) : CoroutineScope by coroutineScope {
|
||||
val dialogMessageHasBeenShown = AtomicBoolean(false)
|
||||
}
|
||||
|
||||
override fun applicationActivated(ideFrame: IdeFrame) {
|
||||
service<ServiceScope>().launch {
|
||||
val serviceScope = service<ServiceScope>()
|
||||
if (serviceScope.dialogMessageHasBeenShown.getAndSet(true)) return
|
||||
|
||||
serviceScope.launch {
|
||||
val changedOptions = ensureInVmOptions()
|
||||
when {
|
||||
changedOptions.isEmpty() -> {
|
||||
|
||||
Reference in New Issue
Block a user