Java 类com.intellij.psi.DelegatePsiTarget 实例源码

项目:intellij-ce-playground    文件:DomDocumentationProvider.java   
@Override
public String generateDoc(PsiElement element, final PsiElement originalElement) {
  if (element instanceof PomTargetPsiElement) {
    PomTarget target = ((PomTargetPsiElement)element).getTarget();
    if (target instanceof DelegatePsiTarget) {
      element = ((DelegatePsiTarget)target).getNavigationElement();
    }
  }
  final DomElement domElement = DomUtil.getDomElement(element);
  if (domElement == null) {
    return null;
  }
  ElementPresentationTemplate template = domElement.getChildDescription().getPresentationTemplate();
  if (template != null) {
    String documentation = template.createPresentation(domElement).getDocumentation();
    if (documentation != null) return documentation;
  }
  return ElementPresentationManager.getDocumentationForElement(domElement);
}
项目:tools-idea    文件:DomDocumentationProvider.java   
public String generateDoc(PsiElement element, final PsiElement originalElement) {
  if (element instanceof PomTargetPsiElement) {
    PomTarget target = ((PomTargetPsiElement)element).getTarget();
    if (target instanceof DelegatePsiTarget) {
      element = ((DelegatePsiTarget)target).getNavigationElement();
    }
  }
  final DomElement domElement = DomUtil.getDomElement(element);
  if (domElement == null) {
    return null;
  }
  ElementPresentationTemplate template = domElement.getChildDescription().getPresentationTemplate();
  if (template != null) {
    String documentation = template.createPresentation(domElement).getDocumentation();
    if (documentation != null) return documentation;
  }
  return ElementPresentationManager.getDocumentationForElement(domElement);
}
项目:consulo-xml    文件:DomDocumentationProvider.java   
public String generateDoc(PsiElement element, final PsiElement originalElement) {
  if (element instanceof PomTargetPsiElement) {
    PomTarget target = ((PomTargetPsiElement)element).getTarget();
    if (target instanceof DelegatePsiTarget) {
      element = ((DelegatePsiTarget)target).getNavigationElement();
    }
  }
  final DomElement domElement = DomUtil.getDomElement(element);
  if (domElement == null) {
    return null;
  }
  ElementPresentationTemplate template = domElement.getChildDescription().getPresentationTemplate();
  if (template != null) {
    String documentation = template.createPresentation(domElement).getDocumentation();
    if (documentation != null) return documentation;
  }
  return ElementPresentationManager.getDocumentationForElement(domElement);
}