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