ModCommand (@NotNull Project project, @NotNull List<ProblemDescriptor> descriptors) { final List<Handler> handlers = StreamEx.of(descriptors).map(descriptor -> descriptor.getPsiElement().getParent()) .select(PsiClass.class).map(Handler::new).toList(); return ModCommand.psiUpdate(ActionContext.from(descriptors.get(0)), updater -> { ContainerUtil.map(handlers, h -> h.getWritable(updater)) .forEach(Handler::makeStatic); }); }