void (final MetaHandler metaHandler, final PsiFile file, final ExternalUriProcessor processor) { final ProgressIndicator pi = ProgressManager.getInstance().getProgressIndicator(); final String searchFor = metaHandler.searchFor(); if (pi != null) { pi.setText(XmlPsiBundle.message("xml.progress.looking.in.schemas")); pi.setIndeterminate(false); } final ExternalResourceManager instanceEx = ExternalResourceManager.getInstance(); final String[] availableUrls = instanceEx.getResourceUrls(null, true); int i = 0; for (@NlsSafe String url : availableUrls) { if (pi != null) { pi.setFraction((double)i / availableUrls.length); pi.setText2(url); ++i; } final XmlFile xmlFile = XmlUtil.findNamespace(file, url); if (xmlFile != null) { final boolean wordFound = checkIfGivenXmlHasTheseWords(searchFor, xmlFile); if (!wordFound) continue; final XmlDocument document = xmlFile.getDocument(); assert document != null; final PsiMetaData metaData = document.getMetaData(); if (metaHandler.isAcceptableMetaData(metaData, url)) { final XmlNSDescriptorImpl descriptor = metaData instanceof XmlNSDescriptorImpl ? (XmlNSDescriptorImpl)metaData : null; final String defaultNamespace = descriptor != null ? descriptor.getDefaultNamespace() : url; // Skip rare stuff if (!XmlUtil.XML_SCHEMA_URI2.equals(defaultNamespace) && !XmlUtil.XML_SCHEMA_URI3.equals(defaultNamespace)) { processor.process(defaultNamespace, url); } } } } }