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

Bug 109051

Summary: [formatting] Add block comment doens't work well if full line is selected
Product: [WebTools] WTP Source Editing Reporter: Joakim Kemeny <joakim.kemeny>
Component: wst.xmlAssignee: Nitin Dahyabhai <thatnitind>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: d_a_carver, for.work.things, itewksbu, nsand.dev, sarika.sinha
Version: 0.7Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 86520    
Bug Blocks:    

Description Joakim Kemeny CLA 2005-09-08 10:14:27 EDT
If you select the full lines and use add block comment and remove block 
comment.

Example, lets say that you have the following xml.

<test>
<test2>
</test2>
</test>

Now select <test2></test2> and add block comment, the result is:

<test1>
<!--<test2>
</test2>
--></test1>

It should be:

<test1>
<!--<test2>
</test2>-->
</test1>

Go back to the original code and select in the same way and add block comment 
and directly choose remove block comment. The selection now expands to include 
1>, that's not the way it should work. 

I also think that the add block comment menu item should be disabled in the 
same way as it works in the Java editor.
Comment 1 David Carver CLA 2007-03-14 16:29:58 EDT
This is more of a formatting preference than really a bug, as the content model is the same.  In fact if formatting is applied you get the closing comment on it's own line.   Just select CTRL-SHIFT-F to format the document.

Tested in 1.5.3.
Comment 2 Amy Wu CLA 2008-02-04 12:58:01 EST
mass reassignment of my bugs to xml-inbox
Comment 3 Nitin Dahyabhai CLA 2008-02-08 05:00:59 EST
Odds are it just needs tweaking so it doesn't surround extraneous trailing whitespace.
Comment 4 Ian Tewksbury CLA 2010-01-18 13:43:43 EST
This should be fixed by Bug 86520.
Comment 5 Sarika Sinha CLA 2010-03-11 06:29:21 EST
Verified with Patch of 86520, problem is resolved after that.
Comment 6 David Carver CLA 2010-03-11 09:01:18 EST
Adding a dependency on bug 86520.
Comment 7 Nick Sandonato CLA 2010-12-15 16:01:14 EST
Resolved by Bug 86520.