mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-90890 Some code formatting preferences ignored sometimes
This commit is contained in:
@@ -99,7 +99,8 @@ public class BraceEnforcer extends JavaJspRecursiveElementVisitor {
|
||||
|
||||
private void processStatement(PsiStatement statement, PsiStatement blockCandidate, int options) {
|
||||
if (blockCandidate instanceof PsiBlockStatement || blockCandidate == null) return;
|
||||
boolean forceNewLine = !FormatterUtil.isFormatterCalledExplicitly() && !ApplicationManager.getApplication().isUnitTestMode();
|
||||
boolean forceNewLine = !FormatterUtil.isFormatterCalledExplicitly() && !ApplicationManager.getApplication().isUnitTestMode()
|
||||
&& !myPostProcessor.getSettings().KEEP_CONTROL_STATEMENT_IN_ONE_LINE;
|
||||
if (forceNewLine
|
||||
|| options == CommonCodeStyleSettings.FORCE_BRACES_ALWAYS
|
||||
|| (options == CommonCodeStyleSettings.FORCE_BRACES_IF_MULTILINE && PostFormatProcessorHelper.isMultiline(statement)))
|
||||
|
||||
Reference in New Issue
Block a user