Request: Derived constructor signature refactoring

It would be very nice to see the ability to automatically refactor derived constructor signatures when modifying a base type constructor. It seems like this would be an obvious feature- and well within ReSharper's ability to accomplish; but alas, when a situation like this arrises one must do a great deal of busy work to achieve the required result.

For example, given the following context:

public class BaseType {
     public BaseType(String foo, String bar, int x, int y) {
     }
}

public class DerivedType {
     public DerivedType(String foo, String bar, int x, int y, Thing thing)
          : base(foo, bar, x, y) {
     }
}



If I want to introduce another argument to the BaseType constructor, then it would follow that the DerivedType constructor must also accept that argument. Currently, if I do a signature refactor on BaseType to introduce another argument, I must also go to each derived type constructor one by one and refactor its signature as well.

Hopefully, this is something you'll seriously consider implementing.

Thanks for the great product.

3 comments

Hi,

+1 to this.

Henning

"Nathan Taylor"  wrote in message
news:11850311.130311307021797822.JavaMail.devnet@confluence.jetbrains.net...

It would be very nice to see the ability to automatically refactor derived
constructor signatures when modifying a base type constructor. It seems like
this would be an obvious feature- and well within ReSharper's ability to
accomplish; but alas, when a situation like this arrises one must do a great
deal of busy work to achieve the required result.

For example, given the following context:



If I want to introduce another argument to the BaseType constructor, then it
would follow that the DerivedType constructor must also accept that
argument. Currently, if I do a signature refactor on BaseType to introduce
another argument, I must also go to each derived type constructor one by one
and refactor its signature as well.

Hopefully, this is something you'll seriously consider implementing.

Thanks for the great product.

---
Original message URL: http://devnet.jetbrains.net/message/5305197#5305197

0

Hello Nathan and Henning,

You're welcome to vote for the following feature request: http://youtrack.jetbrains.net/issue/RSRP-45064.
Thank you!

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Hi,

+1 to this.

Henning

"Nathan Taylor"  wrote in message
news:11850311.130311307021797822.JavaMail.devnet@confluence.jetbrains.
net...

It would be very nice to see the ability to automatically refactor
derived constructor signatures when modifying a base type constructor.
It seems like this would be an obvious feature- and well within
ReSharper's ability to accomplish; but alas, when a situation like
this arrises one must do a great deal of busy work to achieve the
required result.

For example, given the following context:

 public BaseType(String foo, String bar, int x, int y) {
> }
> }
> public class DerivedType {
> public DerivedType(string foo, string bar, int x, int y, Thing
> thing)
> : base(foo, bar, x, y) {
> }
> }]]>

If I want to introduce another argument to the BaseType constructor,
then it would follow that the DerivedType constructor must also accept
that argument. Currently, if I do a signature refactor on BaseType to
introduce another argument, I must also go to each derived type
constructor one by one and refactor its signature as well.

Hopefully, this is something you'll seriously consider implementing.

Thanks for the great product.

---
Original message URL:
http://devnet.jetbrains.net/message/5305197#5305197



0

Thanks for the link, though I must say I'm rather disappointed to see that this issue was requested over 3 years ago without any progress having been made.

0

Please sign in to leave a comment.