ExternalSystemNode<ExternalProjectPojo> (@NotNull String configPath) { for (int i = getRoot().getChildCount() - 1; i >= 0; i--) { ExternalSystemNode<?> child = getRoot().getChildAt(i); Object childElement = child.getDescriptor().getElement(); if (childElement instanceof ExternalProjectPojo && ((ExternalProjectPojo)childElement).getPath().equals(configPath)) { return (ExternalSystemNode<ExternalProjectPojo>)child; } for (int j = child.getChildCount() - 1; j >= 0; j--) { ExternalSystemNode<?> grandChild = child.getChildAt(j); Object grandChildElement = grandChild.getDescriptor().getElement(); if (grandChildElement instanceof ExternalProjectPojo && ((ExternalProjectPojo)grandChildElement).getPath().equals(configPath)) { return (ExternalSystemNode<ExternalProjectPojo>)grandChild; } } } return null; }