boolean (@NotNull ActionContext context, @NotNull ModCommand command, @Nullable Editor editor) { Project project = context.project(); if (command instanceof ModUpdateFileText upd) { return executeUpdate(project, upd); } if (command instanceof ModUpdateReferences decl) { return !executeTrackDeclaration(context, decl, editor); } if (command instanceof ModCompositeCommand cmp) { return executeComposite(context, cmp, editor); } if (command instanceof ModNavigate nav) { return executeNavigate(project, nav); } if (command instanceof ModHighlight highlight) { return executeHighlight(project, highlight); } if (command instanceof ModCopyToClipboard copyToClipboard) { return executeCopyToClipboard(copyToClipboard); } if (command instanceof ModNothing) { return true; } if (command instanceof ModChooseAction chooser) { return executeChoose(context, chooser, editor); } if (command instanceof ModChooseMember chooser) { return executeChooseMember(context, chooser, editor); } if (command instanceof ModDisplayMessage message) { return executeMessage(project, message); } if (command instanceof ModRenameSymbol rename) { return executeRename(project, rename, editor); } if (command instanceof ModCreateFile create) { return executeCreate(project, create); } if (command instanceof ModDeleteFile deleteFile) { return executeDelete(project, deleteFile); } if (command instanceof ModShowConflicts showConflicts) { return executeShowConflicts(context, showConflicts, editor); } if (command instanceof ModStartTemplate startTemplate) { return executeStartTemplate(context, startTemplate, editor); } if (command instanceof ModUpdateInspectionOptions updateOptions) { return executeUpdateInspectionOptions(context, updateOptions); } throw new IllegalArgumentException("Unknown command: " + command); }