public static CompiledPattern compilePattern(Project project, MatchOptions options, boolean checkForErrors, boolean optimizeScope)
    throws MalformedPatternException, NoMatchFoundException {
    return ReadAction.compute(() -> doCompilePattern(project, options, checkForErrors, optimizeScope));
  }
public static CompiledPattern compilePattern(Project project, MatchOptions options, boolean checkForErrors, boolean optimizeScope)