Bug Report T412313
Visible to All Users

The "Organize Members" feature incorrectly determines the default visibility of members in Visual Basic

created 9 years ago (modified 9 years ago)

Hi,
If I have a rule to organise properties into a group, I would like the ordering of properties within that group to remain untouched. This may be because I have grouped them due to a natural relationship, or because t he properties will be bound to a grid and the grid's column order defaults to the property declaration order, which saves me some time. Within the organize member rules though, I don't appear to be able to switch off the sorting. I can select sort and delete it, and it appears to be gone, but applying the operation to code still applies the sort, and opening the options again shows that the sort has come back.

For example, edit the Organise Members settings, with the default rule set select "Public Properties". At the bottom of the detail pane at the right you will see it is set to Sort By Name Ascending. Select this sort and press the Delete button. If you then apply the function to a file you will find that it has still sorted the properties. I also appear to have hit a bug at this stage - attempting to open the options window now does not do anything, I can't get back to the options. The only way to get the window back is to close and re-open visual studio. When I do so, and go to the options again, I can see that coderush has in fact added the sort back to the rule

Would it be possible to support leaving the order unchanged, ie, continue to bring all the properties together based on the rules , but leave them in their original order within that group

Comments (3)
DevExpress Support Team 9 years ago

    Hi Kevin,

    I tried to reproduce the issue on my side, but without success. I recorded a screencast with the following code snippet to reproduce the problem.
    Would you please review the screencast and point me what I am doing wrong?

    Visual Basic
    Namespace ClassLibrary3 Public Class [MyClass] ' Fields... Private _PropertyName As Integer Private _PropertyName1 As Integer Private _PropertyName2 As Integer Private Sub MethodName() End Sub Private Sub MethodName2() End Sub Private Sub MethodName3() End Sub Public Property B() As Integer Get Return _PropertyName1 End Get Set _PropertyName1 = Value End Set End Property Public Property C() As Integer Get Return _PropertyName End Get Set _PropertyName = Value End Set End Property Public Property A() As Integer Get Return _PropertyName2 End Get Set _PropertyName2 = Value End Set End Property End Class End Namespace

    > The only way to get the window back is to close and re-open visual studio.
    Thanks for pointing out the problem, I reproduced it.
    I've created a separate ticket on your behalf: "Organize members->Public properties->Sort by:->Delete" button pressing makes impossible "Options" window reopening , the problem will be implemented in the context of the ""Organize members->Public properties->Sort by:->Delete" button pressing makes impossible "Options" window reopening ticket.

    KO KO
    Kevin O'Donovan 9 years ago

      I wonder if it's because I am performing the action on an interface. See the screencast here. Note that both the nested interface definition and the parent interface have their properties sorted despite me selecting not to do so.

      Okay, it does appear to be an interface issue, and also an issue with nested classes. Here is another example, with a class and an interface: http://screencast.com/t/kj8dXLb0u. As you can see, the outer class properties are not sorted, but the inner class properties are. For the interface both the inner and outer interfaces are sorted.

      Perhaps I'm using the rules incorrectly? Should these both be classed as public properties or could something higher up the list be interfering? Doesn't look like it - I moved public properties to the top of the rules, but it still behaved the same.

      Here are the two code files:

      Visual Basic
      Public Class Class1 Public Property F6 As String Public Property E5 As String Public Property D4 As String Public Class Class2 Property B2 As String Property A1 As String Property C3 As String End Class End Class
      Visual Basic
      Public Interface Interface1 Interface Interface2 Property C3 As String Property B2 As String Property A1 As String End Interface Property E5 As String Property F6 As String Property D4 As String End Interface
      DevExpress Support Team 9 years ago

        Thank you for the provided code snippet. I have reproduced the problem.
        The problem occurred because of incorrect property visibility settings, thus if you delete "Sort By Name Ascending" for private properties, you get the result you expect.
        We will try to fix this problem as soon as possible. Once we do this, we will let you know about this in the context of this ticket.

        Answers approved by DevExpress Support

        created 9 years ago (modified 9 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.