void (PsiFile psiFile, int startOffset, int endOffset) { List<TextRange> ranges = List.of(new TextRange(startOffset, endOffset)); Project project = psiFile.getProject(); CodeStyleManager.getInstance(project).reformatChanges(psiFile, new ChangedRangesInfo(ranges, ranges)); }