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

Bug 63899

Summary: Undo in collapsed folding causes wrong modification in java editor
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: major    
Priority: P3    
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Markus Keller CLA 2004-05-25 12:08:04 EDT
I20040525-0800

- Have this in p/A.java:
<snip>
package p;

import java.util.HashMap;
import java.util.Vector;

class A {
	void method(Vector v, HashMap hm) {
		//- collapse imports fold
		//- add parameter ", Random r"
		//- set caret into "Random", Ctrl+Shift+M, Ctrl+Z
		//-> Undo is wrong!
	}
}
</snip>

- do the steps in the comments
-> result (not only in display; same after saving to disk):
<snip>
package p;

import java.util.HashMap;
import java.util.Random;
import java.util.Vector;

class A {
	void mor v, HashMap hm, Random r) {
		//- collapse imports fold
		//- add parameter ", Random r"
		//- set caret into "Random", Ctrl+Shift+M, Ctrl+Z
		//-> Undo is wrong!
	}
}
</snip>
Comment 1 Kai-Uwe Maetzel CLA 2004-05-25 12:27:43 EDT

*** This bug has been marked as a duplicate of 61171 ***