コード例 #1
0
 @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)) {
       minRange = textRange;
       ret = reference;
     }
   }
   return ret;
 }
コード例 #2
0
 @Override
 @NotNull
 public PsiReference[] getReferences() {
   return SharedPsiElementImplUtil.getReferences(this);
 }
コード例 #3
0
 @Override
 public PsiElement getPrevSibling() {
   return SharedPsiElementImplUtil.getPrevSibling(this);
 }
コード例 #4
0
 @Override
 public PsiReference findReferenceAt(int offset) {
   return SharedPsiElementImplUtil.findReferenceAt(this, offset);
 }
コード例 #5
0
 @Override
 public PsiReference findReferenceAt(int offset) {
   return SharedPsiElementImplUtil.findReferenceAt(getPsi(getBaseLanguage()), offset);
 }