private FormatTextRanges getRanges(@NotNull FormattingService formattingService) {
      if (formattingService instanceof ExternalFormatProcessorAdapter) {
        return myRanges;
      }
      FormatTextRanges textRanges = myRanges.ensureNonEmpty();
      textRanges.setExtendToContext(true);
      return textRanges;
    }
private FormatTextRanges getRanges(@NotNull FormattingService formattingService)