Set<String> (@NotNull Project project, @NotNull String tagName) { Collection<VirtualFile> files = XmlTagNamesIndex.getFilesByTagName(tagName, project); if (files.isEmpty()) { return Collections.emptySet(); } // XmlNamespaceIndex.getFileNamespace accesses FileBasedIndex, so, cannot process values (it is prohibited to process as part of another processing) Set<String> possibleUris = new LinkedHashSet<>(files.size()); for (VirtualFile virtualFile : files) { String namespace = XmlNamespaceIndex.getNamespace(virtualFile, project); if (namespace != null) { possibleUris.add(namespace); } } return possibleUris; }