mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 15:06:56 +07:00
IJPL-155874 make SpellChecker's quick fixes DumbAware
GitOrigin-RevId: 8ee646330a9090d309080fd252855e1eadc8d275
This commit is contained in:
committed by
intellij-monorepo-bot
parent
67c93e119d
commit
a1d4af8f5b
@@ -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.
|
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||||
package com.intellij.spellchecker.quickfixes
|
package com.intellij.spellchecker.quickfixes
|
||||||
|
|
||||||
import com.intellij.codeInsight.intention.FileModifier
|
import com.intellij.codeInsight.intention.FileModifier
|
||||||
@@ -10,6 +10,7 @@ import com.intellij.codeInsight.intention.preview.IntentionPreviewUtils
|
|||||||
import com.intellij.openapi.editor.Document
|
import com.intellij.openapi.editor.Document
|
||||||
import com.intellij.openapi.editor.Editor
|
import com.intellij.openapi.editor.Editor
|
||||||
import com.intellij.openapi.editor.impl.DocumentMarkupModel
|
import com.intellij.openapi.editor.impl.DocumentMarkupModel
|
||||||
|
import com.intellij.openapi.project.DumbAware
|
||||||
import com.intellij.openapi.project.Project
|
import com.intellij.openapi.project.Project
|
||||||
import com.intellij.openapi.util.NlsSafe
|
import com.intellij.openapi.util.NlsSafe
|
||||||
import com.intellij.openapi.util.Segment
|
import com.intellij.openapi.util.Segment
|
||||||
@@ -32,13 +33,13 @@ class ChangeTo(typo: String, element: PsiElement, private val range: TextRange)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private object ChangeToTitleAction : ChoiceTitleIntentionAction(fixName, fixName), HighPriorityAction
|
private object ChangeToTitleAction : ChoiceTitleIntentionAction(fixName, fixName), HighPriorityAction, DumbAware
|
||||||
|
|
||||||
override fun getTitle(): ChoiceTitleIntentionAction = ChangeToTitleAction
|
override fun getTitle(): ChoiceTitleIntentionAction = ChangeToTitleAction
|
||||||
|
|
||||||
private inner class ChangeToVariantAction(
|
private inner class ChangeToVariantAction(
|
||||||
override val index: Int
|
override val index: Int
|
||||||
) : ChoiceVariantIntentionAction(), HighPriorityAction {
|
) : ChoiceVariantIntentionAction(), HighPriorityAction, DumbAware {
|
||||||
|
|
||||||
@NlsSafe
|
@NlsSafe
|
||||||
private var suggestion: String? = null
|
private var suggestion: String? = null
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import com.intellij.openapi.editor.Document;
|
|||||||
import com.intellij.openapi.editor.impl.DocumentMarkupModel;
|
import com.intellij.openapi.editor.impl.DocumentMarkupModel;
|
||||||
import com.intellij.openapi.editor.markup.MarkupModel;
|
import com.intellij.openapi.editor.markup.MarkupModel;
|
||||||
import com.intellij.openapi.editor.markup.RangeHighlighter;
|
import com.intellij.openapi.editor.markup.RangeHighlighter;
|
||||||
|
import com.intellij.openapi.project.DumbAware;
|
||||||
import com.intellij.openapi.project.Project;
|
import com.intellij.openapi.project.Project;
|
||||||
import com.intellij.openapi.ui.popup.JBPopupFactory;
|
import com.intellij.openapi.ui.popup.JBPopupFactory;
|
||||||
import com.intellij.openapi.util.NlsContexts;
|
import com.intellij.openapi.util.NlsContexts;
|
||||||
@@ -36,7 +37,7 @@ import javax.swing.*;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public final class SaveTo implements SpellCheckerQuickFix, LowPriorityAction {
|
public final class SaveTo implements SpellCheckerQuickFix, LowPriorityAction, DumbAware {
|
||||||
@Nullable private DictionaryLayer myLayer = null;
|
@Nullable private DictionaryLayer myLayer = null;
|
||||||
private String myWord;
|
private String myWord;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user