mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 23:39:07 +07:00
(RIDER-102481) Onboarding Wizard: close after plugin import
GitOrigin-RevId: 9d10037f474d3aed7d8d9fc167fd73dec02c460e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b07baecbff
commit
583d846ef8
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contr(ibutors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.ide.startup.importSettings.chooser.ui
|
||||
|
||||
import com.intellij.ide.startup.importSettings.data.StartupWizardService
|
||||
@@ -30,6 +30,12 @@ class WizardControllerImpl(dialog: OnboardingDialog,
|
||||
override val service: StartupWizardService,
|
||||
override val goBackAction: (() -> Unit)?) : WizardController, BaseControllerImpl(dialog) {
|
||||
|
||||
init {
|
||||
service.shouldClose.advise(lifetime) {
|
||||
dialog.dialogClose()
|
||||
}
|
||||
}
|
||||
|
||||
override fun goToThemePage() {
|
||||
if (ScreenReader.isActive()) {
|
||||
goToKeymapPage()
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.ide.startup.importSettings.data
|
||||
|
||||
import com.intellij.ide.startup.importSettings.ImportSettingsBundle
|
||||
import com.intellij.openapi.components.service
|
||||
import com.jetbrains.rd.util.reactive.IPropertyView
|
||||
import com.jetbrains.rd.util.reactive.IVoidSource
|
||||
import com.jetbrains.rd.util.reactive.Signal
|
||||
import org.jetbrains.annotations.Nls
|
||||
import java.awt.Color
|
||||
import javax.swing.Icon
|
||||
@@ -20,6 +22,8 @@ interface StartupWizardService {
|
||||
|
||||
val isActive: Boolean
|
||||
|
||||
val shouldClose: IVoidSource
|
||||
|
||||
fun getKeymapService(): KeymapService
|
||||
|
||||
fun getThemeService(): ThemeService
|
||||
@@ -29,6 +33,7 @@ interface StartupWizardService {
|
||||
|
||||
class DisabledStartupWizardPages : StartupWizardService {
|
||||
override val isActive = false
|
||||
override val shouldClose = Signal<Unit>()
|
||||
override fun getKeymapService() = error("Startup wizard is disabled.")
|
||||
override fun getThemeService() = error("Startup wizard is disabled.")
|
||||
override fun getPluginService() = error("Startup wizard is disabled.")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.ide.startup.importSettings.data
|
||||
|
||||
import com.intellij.icons.AllIcons
|
||||
@@ -8,7 +8,8 @@ import com.intellij.openapi.util.NlsSafe
|
||||
import com.intellij.ui.JBColor
|
||||
import com.intellij.util.ui.StartupUiUtil
|
||||
import com.jetbrains.rd.util.lifetime.Lifetime
|
||||
import com.jetbrains.rd.util.reactive.*
|
||||
import com.jetbrains.rd.util.reactive.Property
|
||||
import com.jetbrains.rd.util.reactive.Signal
|
||||
import com.jetbrains.rd.util.threading.coroutines.launch
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.delay
|
||||
@@ -19,6 +20,7 @@ import javax.swing.Icon
|
||||
|
||||
class WizardServiceTest : StartupWizardService {
|
||||
override val isActive = true
|
||||
override val shouldClose = Signal<Unit>()
|
||||
|
||||
override fun getKeymapService(): KeymapService {
|
||||
return TestKeymapService()
|
||||
|
||||
Reference in New Issue
Block a user