void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { PsiLiteralExpression literalExpression = tryCast(element, PsiLiteralExpression.class); if (literalExpression == null || !literalExpression.isTextBlock()) return; if (!CommonRefactoringUtil.checkReadOnlyStatus(project, literalExpression)) return; String[] lines = PsiLiteralUtil.getTextBlockLines(literalExpression); if (lines == null) return; MixedIndentModel indentModel = MixedIndentModel.create(lines); if (indentModel == null) return; String newTextBlock = indentModel.indentWith(myDesiredIndentType, myTabSize); if (newTextBlock == null) return; TrailingWhitespacesInTextBlockInspection.replaceTextBlock(literalExpression, "\"\"\"\n" + newTextBlock + "\"\"\""); }