private static ContextProvider getFromExtensionOrDefault(PsiFile psiFile) {
        if (psiFile instanceof XPathFile) {
            final ContextProvider instance = ContextProviderExtension.getInstance((XPathFile)psiFile);
            if (instance != null) {
                instance.attachTo(psiFile);
                return instance;
            }
        }
        return new DefaultProvider(PsiTreeUtil.getContextOfType(psiFile, XmlElement.class, true), psiFile.getLanguage());
    }
private static ContextProvider getFromExtensionOrDefault(PsiFile psiFile)