void () { VirtualFile virtualFile = myFixture.copyFileToProject("pluginXml_locateByEp.xml"); PsiFile psiFile = PsiManager.getInstance(getProject()).findFile(virtualFile); XmlFile xmlFile = assertInstanceOf(psiFile, XmlFile.class); IdeaPlugin ideaPlugin = DescriptorUtil.getIdeaPlugin(xmlFile); List<? extends ExtensionPoints> epGroups = ideaPlugin.getExtensionPoints(); assertSize(1, epGroups); List<? extends ExtensionPoint> extensionPoints = epGroups.get(0).getExtensionPoints(); assertSize(2, extensionPoints); ExtensionPoint namedEp = extensionPoints.get(0); ExtensionPoint qualifiedNamedEp = extensionPoints.get(1); assertTrue(StringUtil.isNotEmpty(namedEp.getName().getStringValue())); assertTrue(StringUtil.isNotEmpty(qualifiedNamedEp.getQualifiedName().getStringValue())); verifyLocator(locateExtensionsByExtensionPoint(namedEp), 2); verifyLocator(locateExtensionsByExtensionPoint(qualifiedNamedEp), 2); verifyLocator(locateExtensionsByExtensionPointAndId(namedEp, "myNamedExtension1").findCandidates(), 1); verifyLocator(locateExtensionsByExtensionPointAndId(namedEp, "myNamedExtension2").findCandidates(), 1); verifyLocator(locateExtensionsByExtensionPointAndId(qualifiedNamedEp, "myQualifiedNameExtension1").findCandidates(), 1); verifyLocator(locateExtensionsByExtensionPointAndId(qualifiedNamedEp, "myQualifiedNamedExtension2").findCandidates(), 1); }