Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315343 - Read only region becomes editable if we add comment node
Summary: Read only region becomes editable if we add comment node
Status: CLOSED INVALID
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.sse (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: wst.sse CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-02 02:13 EDT by Rakesh CLA
Modified: 2010-07-27 11:14 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 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.