mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix compilation
This commit is contained in:
@@ -17,6 +17,7 @@ package com.intellij.lang.ant;
|
||||
|
||||
import com.intellij.lang.CompositeLanguage;
|
||||
import com.intellij.lang.StdLanguages;
|
||||
import com.intellij.lang.ant.dom.AntDomAntlib;
|
||||
import com.intellij.lang.ant.dom.AntDomElement;
|
||||
import com.intellij.lang.ant.dom.AntDomProject;
|
||||
import com.intellij.lang.ant.psi.AntFile;
|
||||
@@ -140,6 +141,16 @@ public class AntSupport implements ApplicationComponent {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static AntDomAntlib getAntLib(PsiFile psiFile) {
|
||||
if (psiFile instanceof XmlFile) {
|
||||
final DomManager domManager = DomManager.getDomManager(psiFile.getProject());
|
||||
final DomFileElement<AntDomAntlib> fileElement = domManager.getFileElement((XmlFile)psiFile, AntDomAntlib.class);
|
||||
return fileElement != null? fileElement.getRootElement() : null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static AntDomElement getAntDomElement(XmlTag xmlTag) {
|
||||
final DomElement domElement = DomManager.getDomManager(xmlTag.getProject()).getDomElement(xmlTag);
|
||||
|
||||
Reference in New Issue
Block a user