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

Bug 315343

Summary: Read only region becomes editable if we add comment node
Product: [WebTools] WTP Source Editing Reporter: Rakesh <rakes123>
Component: wst.sseAssignee: wst.sse <wst.sse-inbox>
Status: CLOSED INVALID QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Rakesh CLA 2010-06-02 02:13:40 EDT
Build Identifier:  I20100527-1200

Whenever i copy/paste a comment node ,all of read only region becomes editable.

Reproducible: Always

Steps to Reproduce:
Take this xml

<?xml version="1.0" encoding="UTF-8"?>
<Test>
<!--  -->
aaa
bbb

ccc</Test>

Make 'ccc</Test>' read only.Copy and paste <!--  --> above 'ccc</Test>.It will become editable now.If you copy/paste 'aaa' or 'bbb' ,it remains read only.
It happens due to 'StructuredDocumentRegionsReplacedEvent' fired by BasicStructuredDocument ,which leads to restructuring of nodes by parser,which inturn makes this region editable.
Comment 1 Rakesh CLA 2010-07-27 11:14:49 EDT
I think this defect(raised by me) is invalid.What if we add something like 
<!--long comment
    spanning several 
    lines -->

then, ccc</Test>(our read only area) will be pushed down, hence original ReadOnly region doesn't make sense.