FormattingMode (@NotNull Project project) { if (!project.isDisposed()) { CodeStyleManager instance = getInstance(project); if (instance instanceof FormattingModeAwareIndentAdjuster) { return ((FormattingModeAwareIndentAdjuster)instance).getCurrentFormattingMode(); } } return FormattingMode.REFORMAT; }