DependencyExternalSystemNode (ExternalSystemNode<?> node) { for (ExternalSystemNode<?> child : node.getChildren()) { if (child instanceof DependencyExternalSystemNode && ((DependencyExternalSystemNode)child).myDependencyNode == myReferencedNode) { return (DependencyExternalSystemNode)child; } DependencyExternalSystemNode referencedNode = findReferencedNode(child); if (referencedNode != null) return referencedNode; } return null; }