From 6b22b29a581f7c90aad8d1902de3c747a3224d33 Mon Sep 17 00:00:00 2001 From: Ramazan Dzhekshembaev Date: Tue, 2 May 2023 16:27:29 +0200 Subject: [PATCH] FL-19258 save to dictionary is blocked by side effect guard (cherry picked from commit 7c574b0dcf6f664a0f678725e26fd98a14f4483b) FLEET-MR-2323 GitOrigin-RevId: ce969e2b2c9745428e82e92cd9384246d0ad2f51 --- .../src/com/intellij/spellchecker/quickfixes/SaveTo.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spellchecker/src/com/intellij/spellchecker/quickfixes/SaveTo.java b/spellchecker/src/com/intellij/spellchecker/quickfixes/SaveTo.java index 389b601a0bd0..d89baee888e4 100644 --- a/spellchecker/src/com/intellij/spellchecker/quickfixes/SaveTo.java +++ b/spellchecker/src/com/intellij/spellchecker/quickfixes/SaveTo.java @@ -6,6 +6,7 @@ import com.intellij.codeInsight.intention.LowPriorityAction; import com.intellij.codeInspection.ProblemDescriptor; import com.intellij.codeInspection.ProblemDescriptorUtil; import com.intellij.ide.DataManager; +import com.intellij.model.SideEffectGuard; import com.intellij.openapi.command.CommandProcessor; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.popup.JBPopupFactory; @@ -96,6 +97,8 @@ public final class SaveTo implements SpellCheckerQuickFix, LowPriorityAction { } private static void acceptWord(String word, DictionaryLevel level, ProblemDescriptor descriptor) { + SideEffectGuard.checkSideEffectAllowed(SideEffectGuard.EffectType.SETTINGS); + PsiElement psi = descriptor.getPsiElement(); PsiFile file = psi.getContainingFile(); Project project = file.getProject();