Bug 296055

Summary: [typing][validateEdit] commands affected by auto-edit ignored on first edit to read-only file
Product: [Eclipse Project] Platform Reporter: Konstantine Prevas <kprevas+eclipse>
Component: TextAssignee: Platform-Text-Inbox <platform-text-inbox>
Status: ASSIGNED --- QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 3.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Konstantine Prevas CLA 2009-11-24 15:39:15 EST
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.21 Safari/532.0
Build Identifier: 20090619-0625

If the first edit to a read-only file is affected by an auto-edit command which sets the caret offset, it occurs before the read-only status is cleared (either via a prompt or automatically via a source control plugin); the file's contents are then restored, undoing the command and clearing the file's dirty flag (but leaving the caret where the command would have left it).

Reproducible: Always

Steps to Reproduce:
1. Create a Java file with an unclosed open curly brace.
2. Save the file.
3. Make the file read-only.
4. Place the caret immediately after the curly brace.
5. Press the Enter key.
6. Answer "Yes" to the prompt.
7. The newline and inserted close curly brace disappear, and the file is not dirty.  The caret remains on the next line.
Comment 1 Eclipse Webmaster CLA 2019-09-06 16:17:12 EDT
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.