public static void formatRanges(@NotNull PsiFile file, @NotNull FormatTextRanges ranges, boolean canChangeWhiteSpaceOnly, boolean isFullRange) {
    FormattingService mainService = findService(file, true, isFullRange);
    if (isFullRange) {
      for (FormattingService service : getChainedServices(mainService)) {
        service.formatRanges(file, ranges, canChangeWhiteSpaceOnly, false);
      }
    }
    else {
      // Range formatting can use only one service since the ranges become invalid after reformat.
      mainService.formatRanges(file, ranges, canChangeWhiteSpaceOnly, false);
    }
  }
public static void formatRanges(@NotNull PsiFile file, @NotNull FormatTextRanges ranges, boolean canChangeWhiteSpaceOnly, boolean isFullRange)