Java 类com.intellij.psi.templateLanguages.TemplateLanguageUtil 实例源码

项目:intellij-ce-playground    文件:HtmlPsiUtil.java   
@Nullable
public static XmlDocument getRealXmlDocument(@Nullable XmlDocument doc) {
  if (doc == null) return null;
  final PsiFile containingFile = doc.getContainingFile();

  final PsiFile templateFile = TemplateLanguageUtil.getTemplateFile(containingFile);
  if (templateFile instanceof XmlFile) {
    return ((XmlFile)templateFile).getDocument();
  }
  return doc;
}
项目:intellij-ce-playground    文件:XmlContentDFA.java   
@Nullable
public static XmlContentDFA getContentDFA(@NotNull XmlTag parentTag) {

  if (TemplateLanguageUtil.isInsideTemplateFile(parentTag)) return null;

  XmlContentDFA contentDFA = XsContentDFA.createContentDFA(parentTag);
  if (contentDFA != null) return contentDFA;
  return XmlContentDFAImpl.createContentDFA(parentTag);
}
项目:tools-idea    文件:HtmlPsiUtil.java   
@Nullable
public static XmlDocument getRealXmlDocument(@Nullable XmlDocument doc) {
  if (doc == null) return null;
  final PsiFile containingFile = doc.getContainingFile();

  final PsiFile templateFile = TemplateLanguageUtil.getTemplateFile(containingFile);
  if (templateFile instanceof XmlFile) {
    return ((XmlFile)templateFile).getDocument();
  }
  return doc;
}
项目:tools-idea    文件:XmlContentDFA.java   
@Nullable
public static XmlContentDFA getContentDFA(@NotNull XmlTag parentTag) {

  if (TemplateLanguageUtil.isInsideTemplateFile(parentTag)) return null;

  XmlContentDFA contentDFA = XsContentDFA.createContentDFA(parentTag);
  if (contentDFA != null) return contentDFA;
  return XmlContentDFAImpl.createContentDFA(parentTag);
}
项目:consulo-xml    文件:HtmlPsiUtil.java   
@Nullable
public static XmlDocument getRealXmlDocument(@Nullable XmlDocument doc) {
  if (doc == null) return null;
  final PsiFile containingFile = doc.getContainingFile();

  final PsiFile templateFile = TemplateLanguageUtil.getTemplateFile(containingFile);
  if (templateFile instanceof XmlFile) {
    return ((XmlFile)templateFile).getDocument();
  }
  return doc;
}
项目:consulo-xml    文件:XmlContentDFA.java   
@Nullable
public static XmlContentDFA getContentDFA(@NotNull XmlTag parentTag) {

  if (TemplateLanguageUtil.isInsideTemplateFile(parentTag)) return null;

  XmlContentDFA contentDFA = XsContentDFA.createContentDFA(parentTag);
  if (contentDFA != null) return contentDFA;
  return XmlContentDFAImpl.createContentDFA(parentTag);
}