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

GD Pro duplicate seealso on Class

Last post 10-06-2017, 2:41 PM by Serge B. (SubMain). 5 replies.
Sort Posts: Previous Next
  •  09-18-2017, 3:21 AM 5028

    GD Pro duplicate seealso on Class

    Hi,

    when I use "document this file" on GD pro it creates something like this.

    /// <summary>
    /// Test class
    /// </summary>
    /// at3275 at 15.09.2017
    /// <seealso cref="MyNS.Helpers.INPBase" />
    public class Test : INPBase {

     This is fine so far. But if I call it again I get

    /// <summary>
    /// Test class
    /// </summary>
    /// at3275 at 15.09.2017
    /// <seealso cref="MyNS.Helpers.INPBase" />
    /// <seealso cref="MyNS.Helpers.INPBase" />
    public class Test : INPBase { 

    And again:

    /// <summary>
    /// Test class
    /// </summary>
    /// at3275 at 15.09.2017
    /// <seealso cref="MyNS.Helpers.INPBase" />
    /// <seealso cref="MyNS.Helpers.INPBase" />
    /// <seealso cref="MyNS.Helpers.INPBase" />
    public class Test : INPBase { 

     So for every call the last comment line is created again.

    I just guess there is a problem in the T4 template... 

     

     

  •  09-18-2017, 12:56 PM 5029 in reply to 5028

    Re: GD Pro duplicate seealso on Class

    Hello,

    We could not reproduce that. What GhostDoc Pro version are you using? Did you change default Class template?

     


    Thank you,
    Misha Zhutov
    http://submain.com - .NET Developer Tools | Microsoft VB MVP
  •  09-19-2017, 11:46 AM 5030 in reply to 5029

    Re: GD Pro duplicate seealso on Class

    Hi,

    thank you for the answer. 

    I have tried it again with a blank project including 2 Files:

    TestBase.cs

    using System;
     
    namespace MyApp.Models {
    	public class TestBase {
    	}
    }

     

    And TestIt.cs

    using System;
     
    namespace MyApp.Models {
    	public class TestIt : TestBase {
    		private string _DoTest;
     
    		public string DoTest {
    			get { return _DoTest; }
    			set { _DoTest = value; }
    		}
    	}
    }

    IMPORTANT - the problem came up when I added a property like above.

    First "Document File" on TestIt.cs results in:

    // ***********************************************************************
    // Assembly         : Stickers.Core.STD
    // Author           : Manfred
    // Created          : 2017.09.19
    //
    // Last Modified By : Manfred
    // Last Modified On : 2017.09.19
    // ***********************************************************************
    // <copyright file="TestIt.cs" company="Stickers.Core.STD">
    //     Copyright (c) Professional Programming Pohler e.U. - All rights reserved.
    // </copyright>
    // <summary></summary>
    // ***********************************************************************
    using System;
     
    /// <summary>
    /// The Models namespace.
    /// </summary>
    namespace MyApp.Models {
    	/// <summary>
    	/// Class TestIt.
    	/// </summary>
    	/// <seealso cref="MyApp.Models.TestBase" />
    	public class TestIt : TestBase {
    		private string _DoTest;
     
    		/// <summary>
    		/// Gets or sets the do test.
    		/// </summary>
    		/// <value>The do test.</value>
    		public string DoTest {
    			get { return _DoTest; }
    			set { _DoTest = value; }
    		}
    	}
    }

    A second run asks me, if I want to replace the existing header. No matter what I answer - I get:

    // ***********************************************************************
    // Assembly         : Stickers.Core.STD
    // Author           : Manfred
    // Created          : 2017.09.19
    //
    // Last Modified By : Manfred
    // Last Modified On : 2017.09.19
    // ***********************************************************************
    // <copyright file="TestIt.cs" company="Stickers.Core.STD">
    //     Copyright (c) Professional Programming Pohler e.U. - All rights reserved.
    // </copyright>
    // <summary></summary>
    // ***********************************************************************
    using System;
     
    /// <summary>
    /// The Models namespace.
    /// </summary>
    namespace MyApp.Models {
    	/// <summary>
    	/// Class TestIt.
    	/// </summary>
    	/// <seealso cref="MyApp.Models.TestBase" />
    	/// <seealso cref="MyApp.Models.TestBase" />
    	public class TestIt : TestBase {
    		private string _DoTest;
     
    		/// <summary>
    		/// Gets or sets the do test.
    		/// </summary>
    		/// <value>The do test.</value>
    		public string DoTest {
    			get { return _DoTest; }
    			set { _DoTest = value; }
    		}
    	}
    }

     And for every "Document File" run I get another <seealso line.

    If I also implement (for an example) interfaces I get duplicated lines for these too.

    If I simply document the class (hotkey on the class line) - I can hit as often as I want - it stays (correctly) with one single <seealso line.

     

     

     

  •  09-20-2017, 9:34 PM 5033 in reply to 5030

    Re: GD Pro duplicate seealso on Class

    Thank you for the code snippet provided. We found and fixed the issue. The fix will be available in vNext.

     


    Thank you,
    Misha Zhutov
    http://submain.com - .NET Developer Tools | Microsoft VB MVP
  •  10-06-2017, 12:23 PM 5039 in reply to 5033

    Re: GD Pro duplicate seealso on Class

    And when is v-Next?
  •  10-06-2017, 2:41 PM 5041 in reply to 5039

    Re: GD Pro duplicate seealso on Class

    The fix is included with the most recent update - v5.8 - https://support.submain.com/kb/a42/whats-new-in-ghostdoc-v5.aspx

    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
View as RSS news feed in XML
 
     
 
Home |  Products |  Services |  Download |  Purchase |  Support |  Community |  About Us |