use of com.intellij.spellchecker.quickfixes.SpellCheckerQuickFix in project intellij-community by JetBrains.
the class SpellingPopupActionGroup method extractActions.
private static void extractActions(List<HighlightInfo.IntentionActionDescriptor> descriptors, Map<Anchor, List<AnAction>> actions) {
for (HighlightInfo.IntentionActionDescriptor actionDescriptor : descriptors) {
IntentionAction action = actionDescriptor.getAction();
if (action instanceof QuickFixWrapper) {
QuickFixWrapper wrapper = (QuickFixWrapper) action;
LocalQuickFix localQuickFix = wrapper.getFix();
if (localQuickFix instanceof SpellCheckerQuickFix) {
SpellCheckerQuickFix spellCheckerQuickFix = (SpellCheckerQuickFix) localQuickFix;
Anchor anchor = spellCheckerQuickFix.getPopupActionAnchor();
SpellCheckerIntentionAction popupAction = new SpellCheckerIntentionAction(action);
List<AnAction> list = actions.get(anchor);
if (list != null) {
list.add(popupAction);
}
}
}
}
}
Aggregations