[editor] explicit RA for indent options init in unit tests

GitOrigin-RevId: 342b2289b9b7902f4d29d988ec7729b664ace0b6
This commit is contained in:
Vojtech Balik
2025-07-29 11:03:32 +00:00
committed by intellij-monorepo-bot
parent 9e165f124e
commit 46a40fbaa9
@@ -330,8 +330,11 @@ class SettingsImpl internal constructor(private val editor: EditorImpl?, kind: E
val document = editor.document
val file = getVirtualFile() ?: return
LOG.debug { "reinitDocumentIndentOptions, file ${file.name}" }
if (ApplicationManager.getApplication().isUnitTestMode) {
computeIndentOptions(project, file).associateWithDocument(document)
val app = ApplicationManager.getApplication()
if (app.isUnitTestMode) {
app.runReadAction {
computeIndentOptions(project, file).associateWithDocument(document)
}
}
else {
val job = (project as ComponentManagerEx).getCoroutineScope().launch {