List<DynamicTest> () { ActionManager manager = ActionManager.getInstance(); List<NamedFailure> failures = new ArrayList<>(); for (String id : ContainerUtil.sorted(manager.getActionIdList(""))) { if (ACTION_WITHOUT_TEXT_AND_DESCRIPTION.equals(id)) { continue; } try { AnAction stub = manager.getActionOrStub(id); AnAction action = manager.getAction(id); String actionIdAndClass = "'"+id + "' (" + action.getClass() + ")"; if (stub != action) { Presentation before = stub.getTemplatePresentation(); Presentation after = action.getTemplatePresentation(); checkPresentationProperty("icon", actionIdAndClass, before.getIcon(), after.getIcon()); checkPresentationProperty("text", actionIdAndClass, before.getText(), after.getText()); checkPresentationProperty("description", actionIdAndClass, before.getDescription(), after.getDescription()); } if (action instanceof ActionGroup || action instanceof DecorativeElement) { LOG.debug("ignored action group or separator: " + actionIdAndClass); } else if (StringUtil.isEmpty(action.getTemplatePresentation().getText())) { String message = "no text is defined for template presentation of " + actionIdAndClass + "; even if text is set in 'update' method the internal ID will be shown in Settings | Keymap"; failures.add(new NamedFailure("no text defined for " + id, message)); } } catch (PluginException exception) { LOG.debug(id + " ignored because " + exception.getMessage()); } } return DynamicTests.asDynamicTests(failures, "incorrect presentations"); }