private static @NotNull FormatProcessor buildProcessorAndWrapBlocks(final FormattingModel model,
                                                                      CodeStyleSettings settings,
                                                                      CommonCodeStyleSettings.IndentOptions indentOptions,
                                                                      @Nullable TextRange affectedRange,
                                                                      int offset) {
    FormattingDocumentModel docModel = model.getDocumentModel();
    Block rootBlock = model.getRootBlock();
    return buildProcessorAndWrapBlocks(docModel, rootBlock, settings, indentOptions, new FormatTextRanges(affectedRange, true), offset);
  }
private static @NotNull FormatProcessor buildProcessorAndWrapBlocks(final FormattingModel model,
                                                                      CodeStyleSettings settings,
                                                                      CommonCodeStyleSettings.IndentOptions indentOptions,
                                                                      @Nullable TextRange affectedRange,
                                                                      int offset)