private List<PairProcessor<Project, VirtualFile>> recalculatePatterns() {
    final List<PairProcessor<Project, VirtualFile>> result = new SmartList<>();
    for (final Item patternText : patterns) {
      switch (patternText.mappingKind) {
        case File -> result.add((project, vfile) -> vfile.equals(getRelativeFile(project, patternText)) ||
                                                    vfile.getUrl().equals(Item.neutralizePath(patternText.getPath())));
        case Pattern -> {
          String pathText = FileUtil.toSystemIndependentName(patternText.getPath());
          final Pattern pattern = pathText.isEmpty()
                                  ? PatternUtil.NOTHING
                                  : pathText.indexOf('/') >= 0
                                    ? PatternUtil.compileSafe(".*/" + PatternUtil.convertToRegex(pathText), PatternUtil.NOTHING)
                                    : PatternUtil.fromMask(pathText);
          result.add((project, file) -> JsonSchemaObjectReadingUtils.matchPattern(pattern, pathText.indexOf('/') >= 0
                                                                               ? file.getPath()
                                                                               : file.getName()));
        }
        case Directory -> result.add((project, vfile) -> {
          final VirtualFile relativeFile = getRelativeFile(project, patternText);
          if (relativeFile == null || !VfsUtilCore.isAncestor(relativeFile, vfile, true)) return false;
          JsonSchemaService service = JsonSchemaService.Impl.get(project);
          return service.isApplicableToFile(vfile);
        });
      }
    }
    return result;
  }
private List<PairProcessor<Project, VirtualFile>> recalculatePatterns()