Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347840 - [typing] Indentation gets disturbed on paste
Summary: [typing] Indentation gets disturbed on paste
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-31 14:02 EDT by Ayushman Jain CLA
Modified: 2019-12-02 08:59 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ayushman Jain CLA 2011-05-31 14:02:14 EDT
Build id: I20110528-0800
In the following testcase, copy all 3 lines of the string, CTRL + C, select the "Paste here" and paste the copied lines. Observe that the indentation of the 1st line is fine but that of line2 and line3 is different.

Note that the line1 starts from one level less than the default indentation i.e. after having typed "String str =" when one presses enter key, the caret comes at the indentation level of "Paste here", but I started line1 by pressing backspace once. The bug does not happen if line 1 starts from default indentation level.

I have smart typing enabled and "adjust indentation on paste" turned on. Rest of the settings are the default ones.

class Try {
	static void m(int i){
		String str = 
			"line1\n" +
			"line2\n" +
			"line3\n";
		String str1 = 
				"Paste here\n";

	}
}


This was ok in 3.6.2
Comment 1 Dani Megert CLA 2011-06-01 02:34:02 EDT
Looks like the fix for bug 337150 was not yet complete.
Comment 2 Eclipse Genie CLA 2019-12-02 08:59:59 EST
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.

If you have further information on the current state of the bug, please add it. 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.