Community
Participate
Working Groups
private int useAlignmentBreakIndentation(int emptyLinesRules) {
// preserve line breaks in wrapping if specified
// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=198074
boolean specificEmptyLinesRule = emptyLinesRules != PRESERVE_EMPTY_LINES_KEEP_LAST_NEW_LINES_INDENTATION;
if (!this.formatter.preferences.join_wrapped_lines && this.currentAlignment != null && this.currentAlignment.couldBreak()) {
if ((this.currentAlignment != null || specificEmptyLinesRule) && !this.formatter.preferences.join_wrapped_lines) {
// insert a new line only if it has not been already done before
// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=283476
// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=283467
if (this.lastNumberOfNewLines == 0 || specificEmptyLinesRule || this.formatter.arrayInitializersDepth >= 0) {
// Do not use alignment break indentation in specific circumstances