private static boolean keyMatches(@Nullable Object key, @Nullable VirtualFile file, boolean strict) {
    if (file == null) return key == null;
    if (key instanceof VirtualFile) return VfsUtilCore.isAncestor((VirtualFile)key, file, strict);
    // todo also patterns
    if (key == null) return true;
    return false;
  }
private static boolean keyMatches(@Nullable Object key, @Nullable VirtualFile file, boolean strict)