Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 258055

Summary: [formatter] Nested message argument should remain indented after preserving line break
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P5    
Version: 3.5   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Attachments:
Description Flags
Testcase none

Description Philipe Mulet CLA 2008-12-09 06:43:01 EST
Version: 3.5.0 - Build id: I20081209-0100

With formatter preferences set to:
org.eclipse.jdt.core.formatter.join_wrapped_lines=false
org.eclipse.jdt.core.formatter.join_lines_in_comments=false

The following code should remain unchanged after formatting:

public class Test {
	int foo(boolean bbbbbbbbbbbbbbbbbbbbbbbb, boolean ccccccccccccccccccccccc,
			boolean ddddddddddddddddddd,
			int iiiiiiiiiiiiiiiiiiiiiiiiiiii, int jjjjjjjjjjjjjjjjjjjjjjjjjj,
			int kkkkkkkkkkkkkkkkkkkkkkkkk) {

		return foo(bbbbbbbbbbbbbbbbbbbbbbbb, ccccccccccccccccccccccc,
				ddddddddddddddddddd, iiiiiiiiiiiiiiiiiiiiiiiiiiii,
				jjjjjjjjjjjjjjjjjjjjjjjjjj, 
				foo(bbbbbbbbbbbbbbbbbbbbbbbb,
					ccccccccccccccccccccccc, ddddddddddddddddddd,
					iiiiiiiiiiiiiiiiiiiiiiiiiiii,
					jjjjjjjjjjjjjjjjjjjjjjjjjj, 
				foo(bbbbbbbbbbbbbbbbbbbbbbbb,
					ccccccccccccccccccccccc, ddddddddddddddddddd,
					iiiiiiiiiiiiiiiiiiiiiiiiiiii,
					jjjjjjjjjjjjjjjjjjjjjjjjjj, 
				foo(
					bbbbbbbbbbbbbbbbbbbbbbbb,
					ccccccccccccccccccccccc,
					ddddddddddddddddddd,
					iiiiiiiiiiiiiiiiiiiiiiiiiiii,
					jjjjjjjjjjjjjjjjjjjjjjjjjj,
					kkkkkkkkkkkkkkkkkkkkkkkkk))));
	}
}
Comment 1 Philipe Mulet CLA 2008-12-09 06:43:36 EST
Created attachment 119890 [details]
Testcase
Comment 2 Philipe Mulet CLA 2008-12-09 06:44:16 EST
could be a dup of bug 258053
Comment 3 Philipe Mulet CLA 2008-12-09 06:54:52 EST
Note: line wrapping is set at 80
Comment 4 Frederic Fusier CLA 2008-12-09 15:16:11 EST
(In reply to comment #2)
> could be a dup of bug 258053
> 
No, in this peculiar case, we have nested alignments, so it's easier for the formatter to know that an additional indentation should be added each time a new level is entered...
Comment 5 Frederic Fusier CLA 2008-12-09 15:50:31 EST
Hmm, string concatenation also set enclosing alignment. So, this cannot be the only criterium to increase the indentation level...
Comment 6 Eclipse Genie CLA 2020-03-17 03:02:46 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.