Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Refactoring] Extract class #22053

Closed
kuhlenh opened this issue Sep 11, 2017 · 5 comments
Closed

[Refactoring] Extract class #22053

kuhlenh opened this issue Sep 11, 2017 · 5 comments
Labels
Area-IDE Feature - Extract Method Feature Request help wanted The issue is "up for grabs" - add a comment if you are interested in working on it InternalAsk
Milestone

Comments

@kuhlenh
Copy link

kuhlenh commented Sep 11, 2017

This would let you select static methods and extract them into a static class.

Also would be nice to include "extract base class".

@kuhlenh
Copy link
Author

kuhlenh commented Sep 11, 2017

FYI @wli3

@wli3
Copy link

wli3 commented Sep 11, 2017

image

This is a intermediate step to extract to a new class
(
extract to new class;
Extract method
Introduce Parameter, make all value to be passed-in #22051
Make it static
Extract static class
Move Parameter to a field and make it non static
create constructor DI with the field
)

@dpoeschl dpoeschl added this to the 15.later milestone Sep 11, 2017
@DustinCampbell
Copy link
Member

Isn't this just a specialization of a Extract Class refactoring? I wouldn't expect that we'd have a separate refactoring just for selecting static methods to produce a static class. Instead, I would expect this to be knobs on a dialog for a more general Extract Class refactoring.

@wli3
Copy link

wli3 commented Sep 12, 2017

@DustinCampbell agree, it does not need to be a separate refactoring. Although "Extract Class" is very hard, you need to have a better separation(abstraction) in the beginning. I have not seem a good automatic refactoring implementation of extract class. (end up with "new" a new class, pass the old one into constructor of the new class and call as usual. -- A circular dependency generator.)

@jinujoseph jinujoseph modified the milestones: 15.6, Unknown Nov 1, 2017
@kuhlenh kuhlenh changed the title [Refactoring] Extract static class [Refactoring] Extract class Feb 27, 2018
@jinujoseph jinujoseph added the help wanted The issue is "up for grabs" - add a comment if you are interested in working on it label Mar 15, 2018
@jinujoseph jinujoseph modified the milestones: Backlog, 16.1.P1 Mar 1, 2019
@jinujoseph jinujoseph modified the milestones: 16.1.P1, 16.2.P1 Apr 24, 2019
@jinujoseph jinujoseph modified the milestones: 16.2.P1, 16.2 Jun 9, 2019
@jinujoseph jinujoseph modified the milestones: 16.2, 16.3 Jun 24, 2019
@jinujoseph jinujoseph modified the milestones: 16.3, Backlog Aug 13, 2019
@jmarolf jmarolf added the User Story A single user-facing feature. Can be grouped under an epic. label Dec 2, 2021
@jmarolf jmarolf removed the User Story A single user-facing feature. Can be grouped under an epic. label Jan 6, 2022
@ryzngard
Copy link
Contributor

@jmarolf I believe we can close this now? We have extract base class, extract to new static class, and are adding extract static to existing class in 17.4 (it barely missed 17.3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Feature - Extract Method Feature Request help wanted The issue is "up for grabs" - add a comment if you are interested in working on it InternalAsk
Projects
None yet
Development

No branches or pull requests

8 participants