@Override @Nullable public PsiReference findReferenceAt(int offset) { TextRange minRange = new TextRange(0, getContents().length()); PsiReference ret = null; for (final Language language : getLanguages()) { final PsiElement psiRoot = getPsi(language); final PsiReference reference = SharedPsiElementImplUtil.findReferenceAt(psiRoot, offset, language); if (reference == null) continue; final TextRange textRange = reference.getRangeInElement().shiftRight(reference.getElement().getTextRange().getStartOffset()); if (minRange.contains(textRange) && !textRange.contains(minRange)) { minRange = textRange; ret = reference; } } return ret; }
@Override public PsiReference findReferenceAt(final int offset) { return SharedPsiElementImplUtil.findReferenceAt(getPsi(getBaseLanguage()), offset); }
@Override public PsiReference findReferenceAt(int offset) { return SharedPsiElementImplUtil.findReferenceAt(this, offset); }
@Override @NotNull public PsiReference[] getReferences() { return SharedPsiElementImplUtil.getReferences(this); }
@Override public PsiReference[] getReferences() { return SharedPsiElementImplUtil.getReferences(this); }
@NotNull @Override public PsiReference[] getReferences() { return SharedPsiElementImplUtil.getReferences(this); }
@Override @Nonnull public PsiReference[] getReferences() { return SharedPsiElementImplUtil.getReferences(this); }