@Override
  protected boolean acceptFilter(@Nullable Pair<PackageSetBase, NamedScopesHolder> filter, boolean showOnlyFilteredItems) {
    try {
      VirtualFilePointer filePointer = getFilePointer();
      if (!filePointer.isValid()) {
        return false;
      }
      VirtualFile file = filePointer.getFile();
      if (file != null && file.isValid() && filter != null && filter.first.contains(file, getProject(), filter.second)) {
        applyFilter(true);
        return true;
      }
    }
    catch (Throwable e) {
      // TODO: catch and ignore exceptions: see to FilePatternPackageSet
      // sometimes for new file DirectoryFileIndex.getContentRootForFile() return random path
    }
    return false;
  }
@Override
  protected boolean acceptFilter(@Nullable Pair<PackageSetBase, NamedScopesHolder> filter, boolean showOnlyFilteredItems)