@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(); }
@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(); }
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; }
@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(); }