Investigate moving refactoring to the core
Created by: Gert-dev
Same as #42 (closed), but for refactoring.
If it works, the advantages can be rather large; it would allow us to implement refactoring operations such as "extract method" in PHP using php-parser's AST for scanning instead of using flaky regex scanning. We could then also properly unit test it on the PHP side and it could be made available to other clients as well.
Another major advantage is that the server has full knowledge of the codebase, so this would allow refactoring actions such as "Rename method" to propagate across the entire codebase, something that would be rather troublesome to implement on the CoffeeScript side without a lot of additional other commands to analyse the code base on the client side.
One difficulty with this is that refactoring actions usually involve a number of configurable options for the user, usually presented through a dialog - think specifying the name of the extracted method. So a client side package would still have to present the user with a way to select these.
Another difficulty is the preview panel that is currently available in the refactoring package, which displays a preview of the method to be extracted. Although, I think we might as well drop this, I don't think it adds much value in the case of method extraction specifically, other than to verify if the extraction is going to extract the right portion, which should never be a problem if it is working properly - and should be checked by unit tests.