@Override @Nullable public QuickFixAction[] extractActiveFixes( @NotNull RefEntity[] refElements, @NotNull Map<RefEntity, Set<QuickFix>> actions) { Map<Class, QuickFixAction> result = new com.intellij.util.containers.HashMap<Class, QuickFixAction>(); for (RefEntity refElement : refElements) { final Set<QuickFix> localQuickFixes = actions.get(refElement); if (localQuickFixes == null) continue; for (QuickFix fix : localQuickFixes) { if (fix == null) continue; final Class klass = fix instanceof ActionClassHolder ? ((ActionClassHolder) fix).getActionClass() : fix.getClass(); final QuickFixAction quickFixAction = result.get(klass); if (quickFixAction != null) { try { String familyName = fix.getFamilyName(); familyName = !familyName.isEmpty() ? "\'" + familyName + "\'" : familyName; ((LocalQuickFixWrapper) quickFixAction) .setText( InspectionsBundle.message( "inspection.descriptor.provider.apply.fix", familyName)); } catch (AbstractMethodError e) { // for plugin compatibility ((LocalQuickFixWrapper) quickFixAction) .setText(InspectionsBundle.message("inspection.descriptor.provider.apply.fix", "")); } } else { LocalQuickFixWrapper quickFixWrapper = new LocalQuickFixWrapper(fix, myToolWrapper); result.put(klass, quickFixWrapper); } } } return result.values().isEmpty() ? null : result.values().toArray(new QuickFixAction[result.size()]); }