Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Intellij Community
Commits
60e04ca6
Commit
60e04ca6
authored
1 year ago
by
Vladimir Krivosheev
Committed by
intellij-monorepo-bot
1 year ago
Browse files
Options
Download
Email Patches
Plain Diff
IJPL-333 fix for 233
GitOrigin-RevId: de3688e1f2ed3bd287bd8ac9b5c561dc0dd4ce11
parent
9dfd45cf
Branches unavailable
Tags unavailable
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
platform/bootstrap/src/com/intellij/idea/Main.kt
+4
-7
platform/bootstrap/src/com/intellij/idea/Main.kt
platform/platform-impl/src/com/intellij/platform/ide/bootstrap/main.kt
+26
-6
...form-impl/src/com/intellij/platform/ide/bootstrap/main.kt
with
30 additions
and
13 deletions
+30
-13
platform/bootstrap/src/com/intellij/idea/Main.kt
+
4
-
7
View file @
60e04ca6
...
...
@@ -102,13 +102,10 @@ private suspend fun startApp(args: List<String>, mainScope: CoroutineScope, busy
IdeaForkJoinWorkerThreadFactory
.
setupForkJoinCommonPool
(
AppMode
.
isHeadless
())
}
val
configImportNeededDeferred
=
if
(
AppMode
.
isHeadless
())
{
CompletableDeferred
(
false
)
}
else
{
async
(
Dispatchers
.
IO
)
{
isConfigImportNeeded
(
PathManager
.
getConfigDir
())
}
// some code can rely on this flag, even if it is not used to show config import dialog or something config related,
// that's why we check it even in a headless mode (https://youtrack.jetbrains.com/issue/IJPL-333)
val
configImportNeededDeferred
=
async
(
Dispatchers
.
IO
)
{
isConfigImportNeeded
(
PathManager
.
getConfigDir
())
}
// this check must be performed before system directories are locked
...
...
This diff is collapsed.
Click to expand it.
platform/platform-impl/src/com/intellij/platform/ide/bootstrap/main.kt
+
26
-
6
View file @
60e04ca6
...
...
@@ -42,6 +42,7 @@ import com.intellij.util.lang.ZipFilePool
import
com.jetbrains.JBR
import
io.opentelemetry.sdk.OpenTelemetrySdkBuilder
import
kotlinx.coroutines.*
import
kotlinx.coroutines.CancellationException
import
kotlinx.coroutines.debug.internal.DebugProbesImpl
import
org.jetbrains.annotations.ApiStatus.Internal
import
org.jetbrains.annotations.VisibleForTesting
...
...
@@ -207,7 +208,16 @@ fun CoroutineScope.startApplication(args: List<String>,
val
euaDocumentDeferred
=
async
{
loadEuaDocument
(
appInfoDeferred
)
}
val
configImportDeferred
:
Deferred
<
Job
?>
=
async
{
if
(
isHeadless
||
!
configImportNeededDeferred
.
await
())
{
if
(
isHeadless
)
{
if
(
configImportNeededDeferred
.
await
())
{
// make sure we lock the dir before writing
lockSystemDirsJob
.
join
()
enableNewUi
(
logDeferred
)
}
return
@async
null
}
if
(
AppMode
.
isRemoteDevHost
()
||
!
configImportNeededDeferred
.
await
())
{
return
@async
null
}
...
...
@@ -222,11 +232,7 @@ fun CoroutineScope.startApplication(args: List<String>,
)
if
(
ConfigImportHelper
.
isNewUser
())
{
if
(
System
.
getProperty
(
"ide.experimental.ui"
)
==
null
)
{
runCatching
{
EarlyAccessRegistryManager
.
setAndFlush
(
mapOf
(
"ide.experimental.ui"
to
"true"
))
}.
getOrLogException
(
log
)
}
enableNewUi
(
logDeferred
)
if
(
isIdeStartupWizardEnabled
)
{
log
.
info
(
"Will enter initial app wizard flow."
)
...
...
@@ -342,6 +348,20 @@ fun CoroutineScope.startApplication(args: List<String>,
}
}
private
suspend
fun
enableNewUi
(
logDeferred
:
Deferred
<
Logger
>)
{
if
(
System
.
getProperty
(
"ide.experimental.ui"
)
==
null
)
{
try
{
EarlyAccessRegistryManager
.
setAndFlush
(
mapOf
(
"ide.experimental.ui"
to
"true"
))
}
catch
(
e
:
CancellationException
)
{
throw
e
}
catch
(
e
:
Throwable
)
{
logDeferred
.
await
().
error
(
e
)
}
}
}
@Volatile
@JvmField
internal
var
isInitialStart
:
CompletableDeferred
<
Boolean
>?
=
null
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help