void (@NotNull PsiReferenceRegistrar registrar) { registrar.registerReferenceProvider(XmlPatterns.xmlAttributeValue().withLocalName("path"), new PsiReferenceProvider() { @Override public PsiReference @NotNull [] getReferencesByElement(@NotNull PsiElement element, @NotNull ProcessingContext context) { if (!PsiUtil.isPluginXmlPsiElement(element)) return PsiReference.EMPTY_ARRAY; XmlTag tag = ((XmlAttribute)element.getParent()).getParent(); DomElement domElement = DomManager.getDomManager(element.getProject()).getDomElement(tag); if (!(domElement instanceof Extension)) return PsiReference.EMPTY_ARRAY; ExtensionPoint extensionPoint = ((Extension)domElement).getExtensionPoint(); if (extensionPoint == null) return PsiReference.EMPTY_ARRAY; final String extensionPointQualifiedName = extensionPoint.getEffectiveQualifiedName(); if (!UIThemeProvider.EP_NAME.getName().equals(extensionPointQualifiedName) && !UIThemeMetadataService.EP_NAME.getName().equals(extensionPointQualifiedName)) { return PsiReference.EMPTY_ARRAY; } return new FileReferenceSet(element).getAllReferences(); } }); }