void (@NotNull PsiFile file, @NotNull Runnable runnable) { DocCommentSettings docSettings = getDocCommentSettings(file); boolean currDocFormattingEnabled = docSettings.isDocFormattingEnabled(); docSettings.setDocFormattingEnabled(false); try { runnable.run(); } finally { docSettings.setDocFormattingEnabled(currDocFormattingEnabled); } }