Search in sources :

Example 1 with ImplicitNamespaceDescriptorProvider

use of com.intellij.javaee.ImplicitNamespaceDescriptorProvider in project intellij-community by JetBrains.

the class XmlTagImpl method getImplicitNamespaceDescriptor.

@Nullable
private XmlNSDescriptor getImplicitNamespaceDescriptor(String ns) {
    PsiFile file = getContainingFile();
    if (file == null)
        return null;
    Module module = ModuleUtilCore.findModuleForPsiElement(file);
    if (module != null) {
        for (ImplicitNamespaceDescriptorProvider provider : Extensions.getExtensions(ImplicitNamespaceDescriptorProvider.EP_NAME)) {
            XmlNSDescriptor nsDescriptor = provider.getNamespaceDescriptor(module, ns, file);
            if (nsDescriptor != null)
                return nsDescriptor;
        }
    }
    return null;
}
Also used : ImplicitNamespaceDescriptorProvider(com.intellij.javaee.ImplicitNamespaceDescriptorProvider) XmlNSDescriptor(com.intellij.xml.XmlNSDescriptor) Module(com.intellij.openapi.module.Module) Nullable(org.jetbrains.annotations.Nullable)

Aggregations

ImplicitNamespaceDescriptorProvider (com.intellij.javaee.ImplicitNamespaceDescriptorProvider)1 Module (com.intellij.openapi.module.Module)1 XmlNSDescriptor (com.intellij.xml.XmlNSDescriptor)1 Nullable (org.jetbrains.annotations.Nullable)1