Bug 109051 - [formatting] Add block comment doens't work well if full line is selected
Summary: [formatting] Add block comment doens't work well if full line is selected
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xml (show other bugs)
Version: 0.7   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nitin Dahyabhai CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords: helpwanted
Depends on: 86520
Blocks:
  Show dependency tree
 
Reported: 2005-09-08 10:14 EDT by Joakim Kemeny CLA
Modified: 2010-12-15 16:01 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.