Export to GitHub

cr-documentor - issue #26

Context menu text helpers behave incorrectly under VS2010


Posted on Mar 3, 2010 by Helpful Wombat

Running VS2010, DXCore 2010.1 the context menu text helpers don't all behave as expected.


<para />, <code />: (Both of these behave the same.) Partial line selection/embedding doesn't work well in VS2008 or VS2010. Remove it.

Full line embedding is inconsistent. Select a full line and embed in <para />. START WITH: /// <summary> /// Embed this. /// </summary>

SELECT the entire "Embed this." line.

EXPECTED: /// <summary> /// <para> /// Embed this. /// </para> /// </summary>

ACTUAL: /// <summary>

/// <para> /// Embed this. /// </para> /// </summary>


Templates: <list />, primary blocks (<param /> etc.): START WITH:

/// <summary> /// This is some text. /// </summary>

Place the caret before "This" and insert a list template.

EXPECTED: /// <summary> /// <list type="definition"> /// <item> /// <term></term> /// <description></description> /// </item> /// </list> /// This is some text. /// </summary>

ACTUAL: /// <summary> /// /// <list type="definition"> /// <item> /// <term></term> /// <description></description> /// </item> /// </list> /// This is some text. /// </summary>

Now place the caret after "This" and before "is" and insert the template.

EXPECTED: /// <summary> /// This /// <list type="definition"> /// <item> /// <term></term> /// <description></description> /// </item> /// </list> /// is some text. /// </summary>

ACTUAL: /// <summary> /// This /// <list type="definition"> /// <item> /// <term></term> /// <description></description> /// </item> /// </list> /// is some text. /// </summary>

In all cases, the "block" insertions appear to handle the first line of the insertion incorrectly.


Convert to XML Doc Comment:

The first line seems to be handled incorrectly.

START WITH:

[Required] [DataType(DataType.Password)] [DisplayName("Current password")] public string OldPassword { get; set; }

Select it all, convert to XML doc comment.

EXPECTED: /// [Required] /// [DataType(DataType.Password)] /// [DisplayName(&quot;Current password&quot;)] /// public string OldPassword { get; set; }

ACTUAL: [Required]/// /// [DataType(DataType.Password)] /// [DisplayName(&quot;Current password&quot;)] /// public string OldPassword { get; set; }

Comment #1

Posted on Mar 3, 2010 by Helpful Wombat

(No comment was entered for this change.)

Comment #2

Posted on Mar 3, 2010 by Helpful Wombat

It appears I was handling some of the logic detecting whether a comment included the beginning of a line or not incorrectly. Turns out line/selection offsets in the editor are 1-based, not 0-based (so the first character on the line is at offset 1, not 0).

Comment #3

Posted on Mar 3, 2010 by Helpful Wombat

Fixing the line offset issue fixes , and multi-line templates like lists.

Comment #4

Posted on Mar 4, 2010 by Helpful Wombat

Looking at the Convert to XML Doc Comment function, it appears that calling TabifyLine() on the first line in the selection changes the selection to remove it.

I'll have to file an issue with DevExpress.

Comment #5

Posted on Mar 4, 2010 by Helpful Wombat

Filed issue B145330 with DevExpress - http://www.devexpress.com/Support/Center/p/B145330.aspx

Comment #6

Posted on Mar 4, 2010 by Helpful Wombat

DevExpress has reproduced the issue with TabifyLine.

Comment #7

Posted on Mar 9, 2010 by Helpful Wombat

The TabifyLine issue has been marked as fixed on DevExpress, so I'll have to assume it'll be in the next release.

Comment #8

Posted on Mar 11, 2010 by Helpful Wombat

Fixed all that can be fixed on this end. The remaining issues revolve around the TabifyLine problem filed with DevExpress.

Status: Fixed

Labels:
Type-Defect Priority-Critical