New line settings for documentation

8 posts, 0 answers
  1. miksh
    miksh avatar
    275 posts
    Member since:
    Nov 2006

    Posted 04 Oct 2011 Link to this post

    How can I achieve the following code cleaning task below. Currently, JustCode leaves no new line above the propertry documentation.
    Did I miss something?

    namespace MyNamespace{
        using System;
     
        /// <summary>
        ///
        /// </summary>
        public class MyClass
        {
            /// <summary>
            /// Gets or sets the fields.
            /// </summary>
            /// <value>The field.</value>
            public int Property1 { get; set; }
    [no new line here]         
            /// <summary>
            /// Gets or sets the fields.
            /// </summary>
            /// <value>The field.</value>
            public int Property2 { get; set; }
     
            public int Property3 { get; set; }
            public int Property4 { get; set; }
         }
    }
  2. Kaloyan
    Admin
    Kaloyan avatar
    82 posts

    Posted 07 Oct 2011 Link to this post

    Hello Miksh,

     There are options for just that in Code Style -> C# -> New Lines - "Minimum/Maximum lines after auto-implemented properties". If you set these to 1s you'll get empty lines after each auto-property, no matter whether there are comments or not. If you set the values to 0 and 1, respectively, you can adjust the lines manually so that the JustCode formatter will take that into account and won't remove empty lines between auto-properties, in the same time it won't insert new lines where there weren't any. This way you'll get the desired result. Let me know if that works for you.

    Greetings,
    Kaloyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. miksh
    miksh avatar
    275 posts
    Member since:
    Nov 2006

    Posted 07 Oct 2011 Link to this post

    So you have a bug in the latest JustCode (2011.2.916.0). With the default option settings it DOES remove a single blank line between auto-implemented properties. Interesting, if you create the same solution shared option, everything starts working fine.
  5. Kaloyan
    Admin
    Kaloyan avatar
    82 posts

    Posted 12 Oct 2011 Link to this post

    Hi Miksh,

    I've uploaded a screencast here that shows JustCode's behavior in the given scenario with the latest official build. The test setup - VS 2010 with only JustCode (2011.2.916.0) installed and JC contains no solution sharing settings. The formatter seems to be doing its job in this case. Anything I'm missing here?

    Greetings,
    Kaloyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. miksh
    miksh avatar
    275 posts
    Member since:
    Nov 2006

    Posted 12 Oct 2011 Link to this post

    Your steps are absolutely correct. I've just repeated it in my VS and was able to reproduce the issue doing the same steps.
    Is there a way to send you my JustCode settings for your verification?
  7. Kaloyan
    Admin
    Kaloyan avatar
    82 posts

    Posted 12 Oct 2011 Link to this post

    Hello Miksh,

    That'd be great, indeed. The general settings are here - C:\Users\<USER_NAME>\AppData\Roaming\JustCode, and the solution specific are in your solution foder and are of the following form: <SOLUTION_NAME>.jcsettings.xml. Please, send these over and I'll keep you posted on the results from our testing.

    Greetings,
    Kaloyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  8. miksh
    miksh avatar
    275 posts
    Member since:
    Nov 2006

    Posted 12 Oct 2011 Link to this post

    See ticket 472758
  9. Kaloyan
    Admin
    Kaloyan avatar
    82 posts

    Posted 12 Oct 2011 Link to this post

    Hello Miksh,

     I'm closing this thread. We'll continue our comuunication on the matter in the ticket you created.

    Greetings,
    Kaloyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
DevCraft banner