Bug Report T582223
Visible to All Users

Refactorings - The Sort Namespace References refactoring rearranges "using" statements but not their corresponding comments

created 7 years ago

"Sort Namespace References" rearranges "using" statements, but not their corresponding comments.

For example, I typically comment my "using" statements, as "using log4net;  // for LogManager, ILog".

After a "Sort Namespace References" of the "using" area, the "using log4net;" will be re-ordered to a different location, but the "// for …" comment will wind up on a different (and inappropriate) "using" statement.

For example:
-- Before "Sort Namespace References":
using Microsoft.VisualBasic.Devices;
using System;
using System.Collections.Generic;   // for List
using System.IO.Ports;                        // for Computer
using System.Reflection;                    // for MethodBase
using Microsoft.VisualBasic;
using log4net;                                       // for LogManager, ILog

-- After "Sort Namespace References":
using System;
using System.Collections.Generic;
using System.IO.Ports;   // for List
using System.Reflection;              // for Computer
using log4net;            // for MethodBase
using Microsoft.VisualBasic;
using Microsoft.VisualBasic.Devices;                      // for LogManager, ILog

Comments (2)
DevExpress Support Team 7 years ago

    Hi Wayne,
    Thanks for the code snippets.
    We are working on this issue now and will notify you when we have any results.

    DevExpress Support Team 7 years ago

      Hi Wayne,
      We fixed this issue and will later add a hotfix to this ticket.

      Answers approved by DevExpress Support

      created 7 years ago

      We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

      Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.