use of com.intellij.freemarker.psi.files.FtlXmlNamespaceType in project intellij-plugins by JetBrains.
the class Struts2GlobalVariableProvider method installTaglibSupport.
private static void installTaglibSupport(@NotNull final List<FtlVariable> result, @NotNull final Module module, @NotNull @NonNls final String taglibUri, @NotNull @NonNls final String taglibPrefix) {
final XmlFile xmlFile = JspManager.getInstance(module.getProject()).getTldFileByUri(taglibUri, module, null);
if (xmlFile == null) {
return;
}
final XmlDocument document = xmlFile.getDocument();
if (document == null) {
return;
}
final XmlNSDescriptor descriptor = (XmlNSDescriptor) document.getMetaData();
if (descriptor == null) {
return;
}
PsiElement declaration = descriptor.getDeclaration();
if (declaration == null) {
declaration = xmlFile;
}
result.add(new MyFtlLightVariable(taglibPrefix, declaration, new FtlXmlNamespaceType(descriptor)));
}
Aggregations