Bug Report T564267
Visible to All Users

Refactorings - 'Declare Property' incorrectly works for an interface in Visual Basic in certain cases

created 7 years ago

Hello,

I think there is a bug in the Declare property behaviour. This is the situation:

Code
Public Interface IAfdrukStrategy ReadOnly Property MustIncludeFullHeader As Boolean End Interface Public Class AfdrukStrategy Implements IAfdrukStrategy   ReadOnly Property MustIncludeFullHeader As Boolean Implements IAfdrukStrategy.MustIncludeFullHeader Get       Return True     End Get   End Property End Class I have a function somewhere else with a parameter named stratetgy of type IAfdrukStrategy

Now from that function I want to add an extra property on the IAfdrukStrategy, called MustIncludeTotalen

Code
So I press Ctrl+` on strategy.MustIncludeTotalen and select the "Declare property (auto implemented)". Then I can select the location where I want to put the declaration into the IAfdrukStrategy. The location is correct, so I hit enter. The result now is:
Code
Public Interface IAfdrukStrategy ReadOnly Property MustIncludeFullHeader As BooleanEnd Interface Public Class AfdrukStrategy Implements IAfdrukStrategy   ReadOnly Property MustIncludeFullHeader As Boolean Implements IAfdrukStrategy.MustIncludeFullHeader Get Return True End Get End Property   ReadOnly Property MustIncludeTotalen As Boolean Implements IAfdrukStrategy.MustIncludeTotalen End Class
Code
So the interface is messed up (note the BooleanEnd) and the declaration of the added property is missing. It is added to the class that implements it. Thanks, Jaap.
Comments (1)
DevExpress Support Team 7 years ago

    Hi Jaap,

    Thank you for pointing out this issue and providing the code sample. I have reproduced the described behavior of the 'Declare Property' refactoring. We are working on it and will inform you of our progress.

    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.