Bad, Bad Formatting

6 posts, 0 answers
  1. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 03 Mar 2011 Link to this post

    I have this ...
    //***********************************************************************
    // Assembly         : xxxxxxxxxxxxx
    // Author           : Su
    // Created          : 11-29-2010
    //
    // Last Modified By : Stuart Hemming
    // Last Modified On : 25-02-2011
    // Description      :
    //
    // Copyright        : xxxxxxxxxxxxxxxxxxxxx
    //***********************************************************************
    using System;
    using Telerik.Web.UI;
    using System.Linq;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using System.Web.UI;

    Which, once the latest version of JC has had its way, ends up like this...
    using System.Linq;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using System.Web.UI;
    //***********************************************************************
    // Assembly         : xxxxxxxxxx
    // Author           : Su
    // Created          : 11-29-2010
    //
    // Last Modified By : Stuart Hemming
    // Last Modified On : 25-02-2011
    // Description      :
    //
    // Copyright        : xxxxxxxxxxxxxxxxx
    //***********************************************************************
    using System;
    using Telerik.Web.UI;

    I can duplicate this at will.

    -- 
    Stuart

  2. Blagoev
    Admin
    Blagoev avatar
    49 posts

    Posted 08 Mar 2011 Link to this post

    Hi Stuart Hemming,
    Thanks for sending the issue. It seems we can't reproduce the problem Can you send us a simple solution witch reproduces the problem and your current JustCode settings. It may be something related to specific settings plus the solution you are working on.

    Kind regards,
    Blagoev
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. DevCraft banner
  4. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 06 Apr 2011 Link to this post

    Blagoev,

    Please forgive me for taking so long to reply; I lost track of this one.

    The problem appears, on closer observation, to be one of timing. Let me explain.

    If the block of using statements is in order, the reformatting doesn't cause a problem. You can see JC moving stuff around and sometimes it just puts one or two usings clauses above the comment block and, I think, it believes it has put them in the right place.

    The issue doesn't /appear/ to be related to the size of the source file, but it /does/ appear to happen more often if the VS I'm in has been running a while.

    -- 
    Stuart
  5. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 07 Apr 2011 Link to this post

    Also, it /seems/ that if the using block is collapsed, then the problem doesn't occur. At least, it hasn't so far.

    -- 
    Stuart
  6. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 07 Apr 2011 Link to this post

    Blagoev,

    I've just downloaded the latest internal build. This version still moves one or 2 lines of using statements above the comment block. Unlike previous versions, though, formatting the file again, immediately afterwards seems to correct the problem; I don;t have to move the mis-places statements myself.

    -- 
    Stuart
  7. Blagoev
    Admin
    Blagoev avatar
    49 posts

    Posted 08 Apr 2011 Link to this post

    Hello Stuart Hemming,
    Still we can't reproduce it here. We will stay alert for this kind of problem and see if it emerges in some deterministic scenario.

    All the best,
    Blagoev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
DevCraft banner