public boolean matches(@Nullable VirtualFile file) {
    if (myPattern != null &&
        file != null &&
        file.isInLocalFileSystem()) {
      try {
        PathMatcher matcher = FileSystems.getDefault().getPathMatcher(getGlob(myPattern));
        return matcher.matches(Paths.get(file.getPath()));
      }
      catch (PatternSyntaxException ignore) {
        return false;
      }
    }
    return false;
  }
public boolean matches(@Nullable VirtualFile file)