void (Project project, Collection<? extends DataNode<TaskData>> taskNodes) { ActionManager actionManager = ActionManager.getInstance(); final ExternalSystemShortcutsManager shortcutsManager = ExternalProjectsManagerImpl.getInstance(project).getShortcutsManager(); if (actionManager != null) { for (DataNode<TaskData> each : taskNodes) { final DataNode<ModuleData> moduleData = ExternalSystemApiUtil.findParent(each, ProjectKeys.MODULE); if (moduleData == null || moduleData.isIgnored()) continue; TaskData taskData = each.getData(); ExternalSystemTaskAction eachAction = new ExternalSystemTaskAction(project, moduleData.getData().getInternalName(), taskData); if (shortcutsManager.hasShortcuts(taskData.getLinkedExternalProjectPath(), taskData.getName())) { actionManager.replaceAction(eachAction.getId(), eachAction); } else { actionManager.unregisterAction(eachAction.getId()); } } } }