ModCommand (@NotNull ActionContext context, @NotNull PsiClass anInterface) { final SearchScope searchScope = anInterface.getUseScope(); final Collection<PsiClass> inheritors = ClassInheritorsSearch.search(anInterface, searchScope, false).findAll(); final MultiMap<PsiElement, @NlsContexts.DialogMessage String> conflicts = IntentionPreviewUtils.isIntentionPreviewActive() ? MultiMap.empty() : getConflicts(anInterface, inheritors, searchScope); Map<PsiElement, ModShowConflicts.Conflict> map = EntryStream.of(conflicts.entrySet().spliterator()) .mapValues(messages -> new ModShowConflicts.Conflict(List.copyOf(messages))) .toMap(); return new ModShowConflicts(map, ModCommand.psiUpdate(anInterface, (writableInterface, updater) -> convertInterfaceToClass(writableInterface, inheritors, updater))); }