Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 372801 | Differences between
and this patch

Collapse All | Expand All

(-)a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe.java (-3 / +3 lines)
Lines 1202-1211 Link Here
1202
	private int useAlignmentBreakIndentation(int emptyLinesRules) {
1202
	private int useAlignmentBreakIndentation(int emptyLinesRules) {
1203
		// preserve line breaks in wrapping if specified
1203
		// preserve line breaks in wrapping if specified
1204
		// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=198074
1204
		// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=198074
1205
		boolean specificEmptyLinesRule = emptyLinesRules != PRESERVE_EMPTY_LINES_KEEP_LAST_NEW_LINES_INDENTATION;
1205
		if (!this.formatter.preferences.join_wrapped_lines && this.currentAlignment != null && this.currentAlignment.couldBreak()) {
1206
		if ((this.currentAlignment != null || specificEmptyLinesRule) && !this.formatter.preferences.join_wrapped_lines) {
1207
			// insert a new line only if it has not been already done before
1206
			// insert a new line only if it has not been already done before
1208
			// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=283476
1207
			// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=283467
1208
			boolean specificEmptyLinesRule = emptyLinesRules != PRESERVE_EMPTY_LINES_KEEP_LAST_NEW_LINES_INDENTATION;
1209
			if (this.lastNumberOfNewLines == 0 || specificEmptyLinesRule || this.formatter.arrayInitializersDepth >= 0) {
1209
			if (this.lastNumberOfNewLines == 0 || specificEmptyLinesRule || this.formatter.arrayInitializersDepth >= 0) {
1210
				
1210
				
1211
				// Do not use alignment break indentation in specific circumstances
1211
				// Do not use alignment break indentation in specific circumstances

Return to bug 372801