use of com.perl5.lang.perl.extensions.parser.PerlReferencesProvider in project Perl5-IDEA by Camelcade.
the class PerlStringContentElementImpl method computeReferences.
@Override
public PsiReference[] computeReferences() {
List<PsiReference> result = new ArrayList<>();
if (looksLikePackage()) {
result.add(new PerlNamespaceReference(PerlStringContentElementImpl.this));
} else {
@SuppressWarnings("unchecked") PerlReferencesProvider referencesProvider = PsiTreeUtil.getParentOfType(PerlStringContentElementImpl.this, PerlReferencesProvider.class, true, PsiPerlStatement.class);
if (referencesProvider != null) {
PsiReference[] references = referencesProvider.getReferences(PerlStringContentElementImpl.this);
if (references != null) {
result.addAll(Arrays.asList(references));
}
}
}
result.addAll(Arrays.asList(ReferenceProvidersRegistry.getReferencesFromProviders(PerlStringContentElementImpl.this)));
return result.toArray(new PsiReference[result.size()]);
}
Aggregations