void () { ActionManagerImpl actionManager = (ActionManagerImpl)ActionManager.getInstance(); AnActionEvent event1 = new AnActionEvent(null, DataContext.EMPTY_CONTEXT, ActionPlaces.UNKNOWN, new Presentation(), actionManager, 0); AnActionEvent event2 = new AnActionEvent(null, SimpleDataContext.getProjectContext(getProject()), ActionPlaces.UNKNOWN, new Presentation(), actionManager, 0); Utils.initUpdateSession(event1); Utils.initUpdateSession(event2); ArrayList<String> failed = new ArrayList<>(); for (String id : actionManager.getActionIds()) { AnAction action = actionManager.getAction(id); if (action == null) { failed.add("Can't find action: " + id); continue; } // check invalid getRequiredData usages try { action.update(event1); action.update(event2); if (action instanceof ActionGroup group) { group.getChildren(null); group.getChildren(event1); group.getChildren(event2); } } catch (Throwable e) { e.printStackTrace(); failed.add(String.format("%s (%s): %s", id, action.getClass().getName(), e.getMessage())); } } assertEmpty("The following actions threw an error with empty DataContext: ", failed); }