From fc77c6eff9243dc68c9d650a3ca5ea9148ab9ca2 Mon Sep 17 00:00:00 2001 From: Alessandro Arcangeli Date: Sat, 2 Nov 2024 20:16:01 +0100 Subject: [PATCH] Remove usage of internal class --- .../ideaclangformat/services/ClangFormatServiceImpl.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/com/github/aarcangeli/ideaclangformat/services/ClangFormatServiceImpl.kt b/src/main/kotlin/com/github/aarcangeli/ideaclangformat/services/ClangFormatServiceImpl.kt index 114ddac..c256cc4 100644 --- a/src/main/kotlin/com/github/aarcangeli/ideaclangformat/services/ClangFormatServiceImpl.kt +++ b/src/main/kotlin/com/github/aarcangeli/ideaclangformat/services/ClangFormatServiceImpl.kt @@ -107,7 +107,7 @@ class ClangFormatServiceImpl : ClangFormatService, Disposable { afterWriteActionFinished.add(canceller) val replacements = computeReplacementsWithError(project, contentAsByteArray, fileName, virtualFile.name) if (replacements != null) { - invokeAndWaitIfNeeded { + ApplicationManager.getApplication().invokeAndWait { runWriteAction { if (stamp == document.modificationStamp) { applyReplacementsWithCommand(project, contentAsByteArray, document, replacements)