DataNode<ModuleData> (@NotNull final DataNode<ProjectData> projectDataNode, @NotNull final String projectPath) { final DataNode<?> node = ExternalSystemApiUtil.findFirstRecursively(projectDataNode, node1 -> node1.getKey().equals(ProjectKeys.MODULE) && node1.getData() instanceof ModuleData && ((ModuleData)node1 .getData()).getLinkedExternalProjectPath().equals(projectPath)); //noinspection unchecked return (DataNode<ModuleData>)node; }