private static boolean processRncUsages(PsiElement tag, LocalSearchScope scope) {
      final Query<PsiReference> query = ReferencesSearch.search(tag, scope);
      for (PsiReference reference : query) {
        final PsiElement e = reference.getElement();
        final RncDefine t = PsiTreeUtil.getParentOfType(e, RncDefine.class, false);
        if (t == null || !PsiTreeUtil.isAncestor(tag, t, true)) {
          return true;
        }
      }
      return false;
    }
private static boolean processRncUsages(PsiElement tag, LocalSearchScope scope)