Bug 114639 - Unexpected newline when using formatter with default settings
Summary: Unexpected newline when using formatter with default settings
Status: VERIFIED DUPLICATE of bug 264112
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal with 3 votes (vote)
Target Milestone: 3.6 M5   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-01 15:44 EST by Boris Bokowski CLA
Modified: 2010-04-27 04:23 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.