Bug Report T436523
Visible to All Users

Refactorings - The "Add to Interface" refactoring needs to show generic parameters

created 8 years ago

Hi guys,

Something I've noticed with the Add To Interface refactoring is that it doesn't show generic parameters.
If there's a hierarchy of interfaces that differ only by generic parameters, you can't tell what interface you're adding it to.

I use this refactoring a lot but I can only use it about half the time I want to because I've got lots of interface hierarchies like below.

I've attached a screenshot of what CodeRush shows when I try and add a method to this interface.

C#
public interface IConfigurationValueEntity : IPersistentEntity, ISystemDataTypeProvider { ...... } public interface IConfigurationValueEntity<TConfiguration> : IConfigurationValueEntity where TConfiguration : class, IConfigurationEntity, IPersistentDistinctEntity<TConfiguration>, new() { ...... } public interface IConfigurationValueEntity<TConfiguration, TEntityType> : IConfigurationValueEntity<TConfiguration> where TConfiguration : class, IConfigurationEntity, IPersistentDistinctEntity<TConfiguration>, new() where TEntityType : class, IPersistentDistinctEntity<TEntityType>, IEntityType, new() { ..... } public interface IConfigurationValueEntity<TConfigurationValue, TEntityType, TConfiguration, TConfiguredEntity, in TConfigurationKeyEnum> : IConfigurationValueEntity<TConfiguration, TEntityType>, IChildEntity<TConfigurationValue, TConfiguredEntity> where TConfigurationValue : class, IPersistentDistinctEntity<TConfigurationValue>, IConfigurationValueEntity<TConfigurationValue, TEntityType, TConfiguration, TConfiguredEntity, TConfigurationKeyEnum>, new() where TConfiguration : class, IPersistentDistinctEntity<TConfiguration>, IConfigurationEntity<TConfiguration, TEntityType>, new() where TConfiguredEntity : class, IPersistentDistinctEntity<TConfiguredEntity>, IConfiguredEntity<TConfiguredEntity, TEntityType, TConfiguration, TConfigurationKeyEnum, TConfigurationValue>, new() where TConfigurationKeyEnum : struct where TEntityType : class, IPersistentDistinctEntity<TEntityType>, IEntityType, new() { ......... }
Comments (1)
DevExpress Support Team 8 years ago

    Hi Quentin,

    Thank you for providing the code sample and screenshot. I have reproduced this issue with the "Add To Interface" refactoring locally. We are working on it and will inform you of our progress.

    Answers approved by DevExpress Support

    created 8 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.