public boolean containsRange(@NotNull PsiFile file, @NotNull TextRange range) {
    for (PsiElement element : getScope()) {
      if (file == element.getContainingFile() && element.getTextRange().contains(range)) {
        return true;
      }
    }
    return false;
  }
public boolean containsRange(@NotNull PsiFile file, @NotNull TextRange range)