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

Bug 340142

Summary: [typing] Bad indentation when pasting unindented method
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: major    
Priority: P3    
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Markus Keller CLA 2011-03-16 07:49:15 EDT
HEAD, was OK in 3.7 M6

- Paste this to Package Explorer

package snippet;
public class Snippet {
}

- set caret after '{' and press Enter
- paste this:

void foo() {
    System.out.println();
}

=> expected:
package snippet;
public class Snippet {
	void foo() {
	    System.out.println();
	}

}

=> was:
package snippet;
public class Snippet {
	void foo() {
    System.out.println();
}

}
Comment 1 Markus Keller CLA 2011-03-16 08:02:48 EDT
Sorry, I had "When pasting > Adjust indentation" disabled on the Typing preference page.