public boolean isResourceFile(File file, @NotNull final File srcRoot) {
    final String name = file.getName();
    final String relativePathToParent;
    final String parentPath = file.getParent();
    if (parentPath != null) {
      relativePathToParent = "/" + FileUtilRt.getRelativePath(FileUtilRt.toSystemIndependentName(srcRoot.getAbsolutePath()), FileUtilRt.toSystemIndependentName(parentPath), '/', SystemInfo.isFileSystemCaseSensitive);
    }
    else {
      relativePathToParent = null;
    }
    for (CompiledPattern pair : myCompiledPatterns) {
      if (matches(name, relativePathToParent, srcRoot, pair)) {
        return true;
      }
    }

    if (myNegatedCompiledPatterns.isEmpty()) {
      return false;
    }

    //noinspection ForLoopReplaceableByForEach
    for (int i = 0; i < myNegatedCompiledPatterns.size(); i++) {
      if (matches(name, relativePathToParent, srcRoot, myNegatedCompiledPatterns.get(i))) {
        return false;
      }
    }
    return true;
  }
public boolean isResourceFile(File file, @NotNull final File srcRoot)