<div style="font-family: Arial; font-size: 14px;"></div><div style="font-family: Arial; font-size: 14px;">I have some ideas to improve Push Down Refactor and I was wondering if you could give me any feedback.<br>I'm <span style="background-color:rgb(255, 255, 255);display:inline !important">Patricio Tourne Passarino and I'm studying Software Engineering at FIUBA (Facultad de Ingeniería de la Universidad de Buenos Aires). I was introduced to Cuis in my "Algorithms and Coding III" class and I thought of a modification that would be usefull in the following case:</span></div><div style="font-family: Arial; font-size: 14px;"><font face="Arial" style="font-size: 0.875rem;"><br></font></div><div style="font-family: Arial; font-size: 14px;"><font face="Arial" style="font-size: 0.875rem;">I have a class "</font><span style="font-size: 0.875rem; line-height: normal;">AClass</span><font face="Arial" style="font-size: 0.875rem;">" with two classes: "ASubclassOne" and "ASubclassTwo".</font></div><div style=""><div><font face="Arial"><span style="background-color:rgb(255, 255, 255);display:inline !important"><font face="Arial"><span style="background-color:rgb(255, 255, 255);display:inline !important">"AClass" has "aMessage" implemented:</span></font><br></span></font></div><div><font face="Arial"><span style="background-color:rgb(255, 255, 255);display:inline !important"></span></font></div><blockquote style="border-left: 3px solid rgb(200, 200, 200); border-top-color: rgb(200, 200, 200); border-right-color: rgb(200, 200, 200); border-bottom-color: rgb(200, 200, 200); padding-left: 10px; color: rgb(102, 102, 102);"><div><font face="Arial"><span style="background-color:rgb(255, 255, 255);display:inline !important"><span>aMessage</span></span></font></div><div><font face="Arial"><span style="background-color:rgb(255, 255, 255);display:inline !important"><div><span style="font-size: 0.875rem;"><br></span></div><div><span style="font-size: 0.875rem;">    "AClass implementation"</span></div></span></font></div></blockquote><div><span style="font-family: Arial; font-size: 14px; line-height: normal; color: rgb(0, 0, 0);"><span style="background-color:rgb(255, 255, 255);display:inline !important">"<span style="background-color:rgb(255, 255, 255);display:inline !important">ASubclassOne</span>" has "aMessage" implemented:</span></span></div><blockquote style="border-left: 3px solid rgb(200, 200, 200); border-top-color: rgb(200, 200, 200); border-right-color: rgb(200, 200, 200); border-bottom-color: rgb(200, 200, 200); padding-left: 10px; color: rgb(102, 102, 102);"><div><span style="font-family: Arial; font-size: 14px; line-height: normal; color: rgb(0, 0, 0);"><span style="color:rgb(102, 102, 102);font-family:system-ui, sans-serif;background-color:rgb(255, 255, 255)"><font face="Arial"><span style="background-color:rgb(255, 255, 255);display:inline !important"><span>aMessage</span></span></font></span></span></div><div><span style="font-family: Arial; font-size: 14px; line-height: normal; color: rgb(0, 0, 0);"><div style="color:rgb(102, 102, 102);font-family:system-ui, sans-serif;background-color:rgb(255, 255, 255)"><font face="Arial"><span style="background-color:rgb(255, 255, 255);display:inline !important"><div><br></div></span></font></div></span></div><div><span style="font-family: Arial; font-size: 14px; line-height: normal; color: rgb(0, 0, 0);"><span style="color:rgb(102, 102, 102);font-family:system-ui, sans-serif;background-color:rgb(255, 255, 255)"><font face="Arial"><span style="background-color:rgb(255, 255, 255);display:inline !important"><span><span style="background-color:rgb(255, 255, 255);display:inline !important">   <span> </span></span>"<span>ASubclassOne</span> implementation"</span></span></font></span></span></div></blockquote><div><span style="font-family: Arial; font-size: 14px; line-height: normal; color: rgb(0, 0, 0);">​I want to move "AClass" <span style="background-color:rgb(255, 255, 255);display:inline !important">implementation of</span> "aMessage" to all subclasses that don't have it implemented allready (without overwriting). Furthermore, instead of removing "<span style="background-color:rgb(255, 255, 255);display:inline !important">aMessage" from </span></span><span style="">​"<span style="font-family:Arial;background-color:rgb(255, 255, 255);display:inline !important">AClass", I want to change it to:</span></span><font face="Arial"><span style="display: inline !important;"><span><br></span></span></font></div><blockquote style="border-left: 3px solid rgb(200, 200, 200); border-top-color: rgb(200, 200, 200); border-right-color: rgb(200, 200, 200); border-bottom-color: rgb(200, 200, 200); padding-left: 10px; color: rgb(102, 102, 102);"><div><span style=""><span style="font-family:Arial;background-color:rgb(255, 255, 255);display:inline !important"><div style="font-family:system-ui, sans-serif;background-color:rgb(255, 255, 255)"><span style="font-family:Arial;line-height:normal;color:rgb(0, 0, 0)"><span style="color:rgb(102, 102, 102);font-family:system-ui, sans-serif;background-color:rgb(255, 255, 255)"><font face="Arial"><span style="background-color:rgb(255, 255, 255);display:inline !important"><span>aMessage</span></span></font></span><div style="color:rgb(102, 102, 102);font-family:system-ui, sans-serif;background-color:rgb(255, 255, 255)"><font face="Arial"><span style="background-color:rgb(255, 255, 255);display:inline !important"><div><br></div></span></font></div></span></div></span></span></div><div><span style=""><span style="font-family:Arial;background-color:rgb(255, 255, 255);display:inline !important"><span style="font-family:system-ui, sans-serif;background-color:rgb(255, 255, 255)"><span style="font-family:Arial;line-height:normal;color:rgb(0, 0, 0)"><span style="color:rgb(102, 102, 102);font-family:system-ui, sans-serif;background-color:rgb(255, 255, 255)"><font face="Arial"><span style="background-color:rgb(255, 255, 255);display:inline !important"><span><span style="background-color:rgb(255, 255, 255);display:inline !important">   <span> <span>self subclassResponsibility.</span></span></span></span></span></font></span></span></span><br></span></span></div></blockquote><div><span style="font-family: Arial; font-size: 14px; line-height: normal; color: rgb(0, 0, 0);">​</span><span style=""><span style="display: inline !important;"><span style=""><span style=""><span style=""><font face="Arial"><span style="display: inline !important;"><span><span style="display: inline !important;"><span><span><br></span></span></span></span></span></font></span></span></span></span></span></div></div><div style="font-family: Arial; font-size: 14px;">I propose Push Down has options for this alternative behaviour. I implemented a demonstration adding the option "Push Down 2.0" in method refactoring options. To reproduce the behaviour described previously, the changes file must be imported, then right click on "aMessage" in "AClass", in refactorings click on Push Down 2.0, then "Preserve" and then "Yes, clean it". This implementation also works for messages with parameters, as "aMessage:".</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">I'm looking forward for your feedback. Also, I would like to know where <span style="background-color:rgb(255, 255, 255);display:inline !important">tests </span>should  go, as I wasn't able to find any testcases for the other refactors to use as reference.</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">Thank you for your time,</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">Patricio Tourne Passarino</div>