[kotlin] Save documents after extracting marker offsets

GitOrigin-RevId: dc6b9ee2ea81e7560a978834ddc3669314414f6a
This commit is contained in:
Bart van Helvert
2024-05-16 12:39:12 +02:00
committed by intellij-monorepo-bot
parent 3892ca1cd3
commit 9fa7231be5
5 changed files with 3 additions and 41 deletions

View File

@@ -1,7 +0,0 @@
package target
class Test {
init {
source.X()
}
}

View File

@@ -1,13 +0,0 @@
package target
import source.logExt
import source.loggerExt
class Foo {
companion object : source.Klogging()
fun baz() {
loggerExt.debug { "something" }
logExt("something")
}
}

View File

@@ -1,10 +0,0 @@
package target
class Foo {
companion object : source.ILogging by source.Klogging()
fun baz() {
logger.debug { "something" }
log("something")
}
}

View File

@@ -1,10 +0,0 @@
package target
class Foo {
companion object : source.Klogging()
fun baz() {
logger.debug { "something" }
log("something")
}
}

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.kotlin.idea.test
@@ -9,6 +9,7 @@ import com.intellij.openapi.application.invokeAndWaitIfNeeded
import com.intellij.openapi.application.runWriteAction
import com.intellij.openapi.diagnostic.ControlFlowException
import com.intellij.openapi.editor.Document
import com.intellij.openapi.fileEditor.FileDocumentManager
import com.intellij.openapi.module.Module
import com.intellij.openapi.project.DumbService
import com.intellij.openapi.project.Project
@@ -111,6 +112,7 @@ fun Document.extractMultipleMarkerOffsets(project: Project, caretMarker: String
}
PsiDocumentManager.getInstance(project).commitAllDocuments()
FileDocumentManager.getInstance().saveAllDocuments()
PsiDocumentManager.getInstance(project).doPostponedOperationsAndUnblockDocument(this)
return offsets