Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340142 - [typing] Bad indentation when pasting unindented method
Summary: [typing] Bad indentation when pasting unindented method
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-16 07:49 EDT by Markus Keller CLA
Modified: 2011-03-16 08:02 EDT (History)
0 users

See Also:


Attachments

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