XmlFile (@Nullable @NonNls String s, ConvertContext context) { if (s != null) { final GenericAttributeValue<XmlFile> element = (GenericAttributeValue<XmlFile>)context.getInvocationElement(); final PsiReference[] references = createReferences(element, element.getXmlAttributeValue(), context); if (references.length > 0) { PsiElement result = references[references.length - 1].resolve(); if (result instanceof XmlFile) { return (XmlFile)result; } } } return null; }