void () { LanguageFilter[] extensions = XMLLanguage.INSTANCE.getLanguageExtensions(); for (LanguageFilter extension : extensions) { XMLLanguage.INSTANCE.unregisterLanguageExtension(extension); } String location = getTestName(false) + ".xsd"; final String url = "http://myschema/"; ExternalResourceManagerExImpl.registerResourceTemporarily(url, location, getTestRootDisposable()); configureByFiles(null, BASE_PATH + getTestName(false) + ".xml", BASE_PATH + getTestName(false) + ".xsd"); assertEmpty(highlightErrors()); Editor[] allEditors = EditorFactory.getInstance().getAllEditors(); Editor schemaEditor = null; for (Editor editor : allEditors) { Document document = editor.getDocument(); PsiFile file = PsiDocumentManager.getInstance(getProject()).getPsiFile(document); if (file == null) continue; if (location.equals(file.getName())) { schemaEditor = editor; break; } } delete(Objects.requireNonNull(schemaEditor)); assertNotEmpty(highlightErrors()); for (LanguageFilter extension : extensions) { XMLLanguage.INSTANCE.registerLanguageExtension(extension); } }