void (Processor<? super Extension> processor, @Nullable String extensionPointId) { final Project project = myElement.getProject(); final ExtensionPoint extensionPointDomElement = ExtensionPointIndex.findExtensionPoint(project, PluginRelatedLocatorsUtils.getCandidatesScope(project), getExtensionPointFqn()); if (extensionPointDomElement == null) return; final List<ExtensionCandidate> candidates; if (extensionPointId == null) { candidates = ExtensionLocatorKt.locateExtensionsByExtensionPoint(extensionPointDomElement); } else { candidates = ExtensionLocatorKt. locateExtensionsByExtensionPointAndId(extensionPointDomElement, extensionPointId, extension -> { final GenericAttributeValue<String> nameElement = getNameElement(extension); return nameElement != null ? nameElement.getStringValue() : null; }).findCandidates(); } final DomManager manager = DomManager.getDomManager(project); for (ExtensionCandidate candidate : candidates) { final XmlTag element = candidate.pointer.getElement(); final DomElement domElement = manager.getDomElement(element); if (domElement instanceof Extension) { if (!processor.process((Extension)domElement)) return; } } }