mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
OPENIDE #186 Add ability hide welcome screen via settings
This commit is contained in:
@@ -23,6 +23,7 @@ import com.intellij.openapi.project.DumbService
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.startup.ProjectActivity
|
||||
import com.intellij.openapi.startup.StartupManager
|
||||
import com.intellij.openapi.util.registry.RegistryManager
|
||||
import com.intellij.util.concurrency.AppExecutorUtil
|
||||
import java.util.concurrent.Callable
|
||||
|
||||
@@ -59,6 +60,12 @@ class OpenIdeWelcomeScreenProjectActivity : ProjectActivity {
|
||||
private fun showWelcomeScreen(project: Project, isFirstOpen: Boolean) {
|
||||
if (!isFirstOpen) return
|
||||
OpenIdeProjectLocalState.getInstance(project).isFirstOpen = false
|
||||
|
||||
val isShowWelcomeScreen = RegistryManager.getInstance()
|
||||
.get("openide.registry.key.show.welcome.screen")
|
||||
.asBoolean()
|
||||
if (!isShowWelcomeScreen) return
|
||||
|
||||
WelcomeScreenHelper(project).showWelcomeScreen()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1868,7 +1868,8 @@
|
||||
|
||||
<registryKey key="client.generator.inlay.action" defaultValue="false"
|
||||
description="Enable open in client generator action"/>
|
||||
<registryKey defaultValue="https://plugins.openide.ru" description="OpenIDE plugins url" key="openide.registry.key.plugins.host.url"/>
|
||||
<registryKey key="openide.registry.key.show.welcome.screen" defaultValue="true"
|
||||
description="Enables the Welcome Screen to be shown when opening a project for the first time"/>
|
||||
</extensions>
|
||||
|
||||
<!--suppress PluginXmlDynamicPlugin -->
|
||||
|
||||
Reference in New Issue
Block a user