Java 类com.intellij.psi.impl.source.resolve.reference.impl.providers.PackageReferenceSet 实例源码

项目:intellij-ce-playground    文件:PsiPackageConverter.java   
@NotNull
public PsiReference[] createReferences(GenericDomValue<PsiPackage> genericDomValue, PsiElement element, ConvertContext context) {
  final String s = genericDomValue.getStringValue();
  if (s == null) {
    return PsiReference.EMPTY_ARRAY;
  }
  GlobalSearchScope scope = context.getSearchScope();
  return new PackageReferenceSet(s, element, ElementManipulators.getOffsetInElement(element), scope != null? scope : GlobalSearchScope.allScope(element.getProject())).getPsiReferences();
}
项目:tools-idea    文件:PsiPackageConverter.java   
@NotNull
public PsiReference[] createReferences(GenericDomValue<PsiPackage> genericDomValue, PsiElement element, ConvertContext context) {
  final String s = genericDomValue.getStringValue();
  if (s == null) {
    return PsiReference.EMPTY_ARRAY;
  }
  return new PackageReferenceSet(s, element, ElementManipulators.getOffsetInElement(element)).getPsiReferences();
}
项目:consulo-java    文件:ImportPackageParser.java   
public PsiReference[] getReferences(@NotNull HeaderValuePart headerValuePart) {
  if (headerValuePart.getParent() instanceof Clause) {
    PackageReferenceSet referenceSet = new PackageReferenceSet(headerValuePart.getUnwrappedText(), headerValuePart, 0);
    return referenceSet.getReferences().toArray(new PsiPackageReference[referenceSet.getReferences().size()]);
  }
  return PsiReference.EMPTY_ARRAY;
}
项目:consulo-java    文件:PsiPackageConverter.java   
@NotNull
public PsiReference[] createReferences(GenericDomValue<PsiJavaPackage> genericDomValue, PsiElement element, ConvertContext context) {
  final String s = genericDomValue.getStringValue();
  if (s == null) {
    return PsiReference.EMPTY_ARRAY;
  }
  return new PackageReferenceSet(s, element, ElementManipulators.getOffsetInElement(element)).getPsiReferences();
}