Skip to content

[feature-request] Support Extraction to superclass #36199

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

Open
Tracked by #55825
Stargator opened this issue Mar 13, 2019 · 4 comments
Open
Tracked by #55825

[feature-request] Support Extraction to superclass #36199

Stargator opened this issue Mar 13, 2019 · 4 comments
Labels
area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. contributions-welcome Contributions welcome to help resolve this (the resolution is expected to be clear from the issue) devexp-refactoring Issues with analysis server refactorings P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug

Comments

@Stargator
Copy link
Contributor

Thank you for taking the time to file an issue!

In order to route, prioritize, and act on this, please include:

  • Dart SDK Version: 2.2.0

I think it would be helpful if developers could extract a method or variable to the super class or parent class. Assuming the class is not part of the Dart SDK.

I see it like this:

class polygon {
// lots of methods/variables 😄 
}

class square extends polygon {
    calculateArea(int sideLength) => sqrt(sideLength);
}

After extracting the method, calculateArea() now resides in the polygon class. Thinking about this, it would be a good idea to provide options for making the extracted method an abstract or implemented method depending on use cases.

@vsmenon vsmenon added the area-intellij Tracking issues for the Dart IntelliJ plugin. label Mar 14, 2019
@alexander-doroshko
Copy link

@vsmenon, I don't think area-intellij is the right label here. Refactorings are first implemented on the Analysis Server end and only then can be adapted on the IDE end.

@bwilkerson bwilkerson added devexp-refactoring Issues with analysis server refactorings legacy-area-analyzer Use area-devexp instead. type-enhancement A request for a change that isn't a bug and removed area-intellij Tracking issues for the Dart IntelliJ plugin. labels Apr 10, 2019
@alexander-doroshko
Copy link

Just for the record and as a source for ideas. Java support in IntelliJ IDEA has more general refactoring called Pull Members Up.

@Stargator
Copy link
Contributor Author

@alexander-doroshko Yes! I'm just trying to go through what I like in refactoring efforts, but I am not versed in everything that's possible or already implemented for other languages.

@srawlins srawlins added the P3 A lower priority bug or feature request label Jan 11, 2021
@escamoteur
Copy link

I really think this refectory should get a little bit more priority. Not having this refectory leads to that many people always define superclasses/interfaces even if they don't need them at the moment, which complicates code unnecessary.

@srawlins srawlins added the contributions-welcome Contributions welcome to help resolve this (the resolution is expected to be clear from the issue) label May 20, 2022
@bwilkerson bwilkerson added area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. and removed legacy-area-analyzer Use area-devexp instead. labels Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. contributions-welcome Contributions welcome to help resolve this (the resolution is expected to be clear from the issue) devexp-refactoring Issues with analysis server refactorings P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

6 participants