List<LookupElement> (@NotNull final DataNode<ProjectData> projectDataNode, @NotNull final String modulePath) { final DataNode<ModuleData> moduleDataNode = findModuleDataNode(projectDataNode, modulePath); if (moduleDataNode == null) { return Collections.emptyList(); } final ModuleData moduleData = moduleDataNode.getData(); final boolean isRoot = projectDataNode.getData().getLinkedExternalProjectPath().equals(moduleData.getLinkedExternalProjectPath()); final Collection<DataNode<TaskData>> tasks = ExternalSystemApiUtil.getChildren(moduleDataNode, ProjectKeys.TASK); List<LookupElement> elements = new ArrayList<>(tasks.size()); for (DataNode<TaskData> taskDataNode : tasks) { final TaskData taskData = taskDataNode.getData(); elements.add(LookupElementBuilder.create(taskData.getName()).withIcon(ExternalSystemIcons.Task)); if (!taskData.isInherited()) { elements.add(LookupElementBuilder.create((isRoot ? ':' : moduleData.getId() + ':') + taskData.getName()) .withIcon(ExternalSystemIcons.Task)); } } return elements; }