We Moved - This Forum is now Read-Only

Our new community is now available at https://support.submain.com/community/. We will leave historical discussions here in this forum view-only mode for search purposes, but moving forward, please post your questions in the appropriate category in the new community.

 
  SubMain - CodeIt.Right The First Time!

/Community

Support Community for SubMain Products
 Home Products Services Download Purchase Support
in Search
 
Home Forums Blogs Tutorials/CIR Tutorials/GD Downloads
Welcome to SubMain Community Sign in | Join | Help

Incorrect indentation

Last post 04-16-2014, 10:04 AM by RichardD. 4 replies.
Sort Posts: Previous Next
  •  04-11-2014, 6:05 AM 3722

    Incorrect indentation

    I have a base class with a virtual property which has the following documentation:

    /// <summary>
    /// Returns a flag indicating whether this action
    /// must be invoked on an STA thread.
    /// </summary>
    /// <value>
    /// <see langword="true"/> if this action must be invoked on an STA thread;
    /// otherwise, <see langword="false"/>.
    /// </value>

    When I create a derived class, override the property, and use GhostDoc to insert the documentation, it inserts the following:

    /// <summary>
    /// Returns a flag indicating whether this action
    ///             must be invoked on an STA thread.
    /// </summary>
    /// <value>
    /// <see langword="true" /> if this action must be invoked on an STA thread;
    ///             otherwise, 
    /// <see langword="false" />.
    /// </value>

    Why is GhostDoc changing my comments?

    VS2013 Pro
    GhostDoc 4.9.14093

    Filed under: ,
  •  04-15-2014, 10:20 AM 3725 in reply to 3722

    Re: Incorrect indentation

    Attachment: screenshot.png

    Hello,

    We cannot reproduce the issue. I attached screenshot after I re-document method.

    Could you please provide us with code snippet that reproduce the issue.

     



    Thank you,
    Misha Zhutov
    http://submain.com - .NET Developer Tools | Microsoft VB MVP
  •  04-16-2014, 4:55 AM 3729 in reply to 3725

    Re: Incorrect indentation

    Within the same project, or projects within the same solution:

    public abstract class BaseClass
    {
        /// <summary>
        /// Returns a flag indicating whether this action
        /// must be invoked on an STA thread.
        /// </summary>
        /// <value>
        /// <see langword="true"/> if this action must be invoked on an STA thread;
        /// otherwise, <see langword="false"/>.
        /// </value>
        public abstract bool RequiresSTA { get; }
    }
    public class DerivedClass : BaseClass
    {
        public override bool RequiresSTA
        {
            get { return true; }
        }
    }
    

    Documenting the property in the derived class produces:

    /// <summary>
    /// Returns a flag indicating whether this action
    /// must be invoked on an STA thread.
    /// </summary>
    /// <value>
    /// <see langword="true"/> if this action must be invoked on an STA thread;
    /// otherwise, 
    /// <see langword="false"/>.
    /// </value>
    

    Note the extra line-break in the second line of the <value> tag.

     

    With the base class in a separate compiled assembly with XML documentation and a bin reference from the current project, documenting the property in the derived class produces:

    /// <summary>
    /// Returns a flag indicating whether this action
    ///             must be invoked on an STA thread.
    /// </summary>
    /// <value>
    /// <see langword="true"/> if this action must be invoked on an STA thread;
    ///             otherwise, 
    /// <see langword="false"/>.
    /// </value>
    

    Not only is there an extra line-break, but now each new-line in the original comment is followed by 12 additional spaces. This did not happen in earlier versions.

     

    I've also noticed that GhostDoc now seems to drop any <exception> tags from the documentation of a derived member, which is not correct.

    I have a small project which reproduces the problem. Let me know if you want me to upload it somewhere.

  •  04-16-2014, 9:48 AM 3731 in reply to 3729

    Re: Incorrect indentation

    Hello Richard,

    Thank you for the additional details.

    Yes, the sample project should help reproduce the issues. Please email it to support at submain dot com - you may need to rename your .zip to .zi_ to get it by the spam filtering.

    Thanks!


    Thank you,
    Serge Baranovsky
    http://submain.com - .NET Developer Tools  |  Microsoft MVP  |  ASP Insider
    » » CodeIt.Right Will Fix Your Code!™ - http://submain.com/codeit.right
    » » C#/VB .NET Coding Guidelines - FREE 100+ page ebook (PDF) http://submain.com/guidelines
  •  04-16-2014, 10:04 AM 3733 in reply to 3731

    Re: Incorrect indentation

    OK, the sample project is on it's way.
View as RSS news feed in XML
 
     
 
Home |  Products |  Services |  Download |  Purchase |  Support |  Community |  About Us |