Modular and Extensible Extract Method
Résumé
Extract method refactoring is one of the most important refactorings in any refactoring engine because it supports developers to create new methods out of existing ones. Its importance comes with the cost of complexity since it needs to take care of many issues to produce code that is syntactically and semantically correct. Finally, their complexity often leads existing extract method refactoring to be defined in a monolithic way. Such an implementation hampers any reuse of analyses and forbids simple variations in the case of domain-specific refactorings based on extract method general idea.
In this article, after describing the challenges of the analysis of Extract Method refactoring in the context of Pharo, we describe a new modular implementation. This implementation is based on the composition of elementary transformations. We validate this approach showing how it supports the natural definition of two domain-specific refactorings: Extract SetUp refactoring (for SUnit) and Extract with Pragma refactoring (for the Slang framework).
Origine | Fichiers produits par l'(les) auteur(s) |
---|