T () { final JpsCompositeElement parent = getParentReference().resolve(); if (parent == null) return null; JpsElementCollection<? extends S> collection = getCollection(parent); if (collection == null) return null; final List<? extends S> elements = collection.getElements(); for (S element : elements) { if (element.getName().equals(myElementName)) { T resolved = resolve(element); if (resolved != null) { return resolved; } } } return null; }