protected static SearchScope getSearchScope(PsiElement element, Editor editor) {
    try {
      return ReadAction.compute(() -> TargetElementUtil.getInstance().getSearchScope(editor, element));
    }
    catch (PsiInvalidElementAccessException e) {
      throw new ProcessCanceledException(e);
    }
  }
protected static SearchScope getSearchScope(PsiElement element, Editor editor)