Bug 114639

Summary: Unexpected newline when using formatter with default settings
Product: [Eclipse Project] JDT Reporter: Boris Bokowski <bokowski>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: amj87.iitr, fg
Version: 3.1   
Target Milestone: 3.6 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Boris Bokowski CLA 2005-11-01 15:44:00 EST
[I20051101-0010]

I am using the code formatter (Ctrl-Shift-F) on the following file, and don't
understand why it inserts a newline in between
"layout"
and
"				.addPlaceholder".

Is this expected behaviour? To me, it seems that these two lines should be
merged to just one line.

---snip---
package de.foo;

import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

public class Perspective implements IPerspectiveFactory {

	public void createInitialLayout(IPageLayout layout) {
		String editorArea = layout.getEditorArea();
		layout.setEditorAreaVisible(false);
		layout.setFixed(true);

		layout.addStandaloneView(View.ID, false, IPageLayout.LEFT, 0.3f,
				editorArea);
		layout
				.addPlaceholder(CopyOfView.ID, IPageLayout.LEFT, 0.3f,
						editorArea);
		layout.addPlaceholder(Copy_2_of_View.ID, IPageLayout.LEFT, 0.3f,
				editorArea);
	}

}
---snip---
Comment 1 Florent Guillaume CLA 2007-04-01 12:38:52 EDT
I have the same problem with Eclipse 3.3M6, an incorrect level of additional indent is done for the method name.

If you use the defaut formatter Eclipse [built-in], in the Line Wrapping section, the example for Function Calls -> Arguments is:
		Other
				.bar(100, 200, 300,
						400, 500, 600,
						700, 800, 900);
Where I'd expect something more like:
		Other.bar(100, 200, 300, 400, 500,
				600, 700, 800, 900);
Comment 2 Olivier Thomann CLA 2007-06-21 13:11:38 EDT

*** This bug has been marked as a duplicate of bug 59891 ***
Comment 3 Frederic Fusier CLA 2010-04-14 06:59:06 EDT
It was in fact more a duplicate of bug 264112, hence it's fixed since 3.6M5.

*** This bug has been marked as a duplicate of bug 264112 ***
Comment 4 Ayushman Jain CLA 2010-04-27 03:29:08 EDT
Verified for  3.6M7 using build I20100426-0852.