void (PsiElement element) { myFile = (XmlFile) element.getContainingFile(); if (element instanceof XmlTag) { myTag = (XmlTag)element; } else { final XmlDocument document = myFile.getDocument(); if (document != null) { myTag = document.getRootTag(); } } if (myTag != null) { myTargetNamespace = myTag.getAttributeValue("targetNamespace"); } Set<PsiFile> dependenciesSet = new HashSet<>(); collectDependencies(myTag, myFile, dependenciesSet); dependencies = ArrayUtil.toObjectArray(dependenciesSet); }