Java 类com.intellij.lang.ant.misc.PsiReferenceListSpinAllocator 实例源码

项目:intellij-ce-playground    文件:AntReferenceInjector.java   
@NotNull
public PsiReference[] inject(@Nullable String unresolvedText, @NotNull PsiElement element, @NotNull ConvertContext context) {
  if (element instanceof XmlAttributeValue) {
    final XmlAttributeValue xmlAttributeValue = (XmlAttributeValue)element;
    final List<PsiReference> refs = PsiReferenceListSpinAllocator.alloc();
    try {
      addPropertyReferences(context, xmlAttributeValue, refs);
      addMacrodefParameterRefs(xmlAttributeValue, refs);
      return refs.size() == 0? PsiReference.EMPTY_ARRAY : ContainerUtil.toArray(refs, new PsiReference[refs.size()]);
    }
    finally {
      PsiReferenceListSpinAllocator.dispose(refs);
    }
  }
  return PsiReference.EMPTY_ARRAY;
}
项目:tools-idea    文件:AntReferenceInjector.java   
@NotNull
public PsiReference[] inject(@Nullable String unresolvedText, @NotNull PsiElement element, @NotNull ConvertContext context) {
  if (element instanceof XmlAttributeValue) {
    final XmlAttributeValue xmlAttributeValue = (XmlAttributeValue)element;
    final List<PsiReference> refs = PsiReferenceListSpinAllocator.alloc();
    try {
      addPropertyReferences(context, xmlAttributeValue, refs);
      addMacrodefParameterRefs(xmlAttributeValue, refs);
      return refs.size() == 0? PsiReference.EMPTY_ARRAY : ContainerUtil.toArray(refs, new PsiReference[refs.size()]);
    }
    finally {
      PsiReferenceListSpinAllocator.dispose(refs);
    }
  }
  return PsiReference.EMPTY_ARRAY;
}
项目:consulo-apache-ant    文件:AntReferenceInjector.java   
@NotNull
public PsiReference[] inject(@Nullable String unresolvedText, @NotNull PsiElement element, @NotNull ConvertContext context) {
  if (element instanceof XmlAttributeValue) {
    final XmlAttributeValue xmlAttributeValue = (XmlAttributeValue)element;
    final List<PsiReference> refs = PsiReferenceListSpinAllocator.alloc();
    try {
      addPropertyReferences(context, xmlAttributeValue, refs);
      addMacrodefParameterRefs(xmlAttributeValue, refs);
      return refs.size() == 0? PsiReference.EMPTY_ARRAY : ContainerUtil.toArray(refs, new PsiReference[refs.size()]);
    }
    finally {
      PsiReferenceListSpinAllocator.dispose(refs);
    }
  }
  return PsiReference.EMPTY_ARRAY;
}