Apex extraction refactorings

Issue #22 new
Scott Wells repo owner created an issue

Add support for extraction refactorings in Apex, in particular extraction of variables, fields, properties, formal parameters, and methods (which is significantly more complex and likely needs to be carved off into its own issue).

Comments (8)

  1. Scott Wells reporter

    Partially delivered in IC2. Extract variable is now available. Still need to add multiple occurrences support, then can add other extraction refactorings based on that foundation.

  2. Justin Julicher

    Hey @RoseSilverSoftware Do you have an ETA on the method extract refactoring? This is probably my most sought after feature as it enables me to refactor and make sense of old code a lot faster (I work in a 10 year old org that needs a lot of work!)


  3. Scott Wells reporter

    Justin, it's coming, but probably not for a few months. I need to clean up a few more false negatives from the existing code inspections (getting really close, though), and then I'm going to use the much more robust expected type inference engine to add smart code completion. After that I'll go back to extraction refactorings, though initially I'll probably tackle constant extraction. Then I'll turn my attention to method extraction. I find myself wanting/needing it almost every day, so I'm also eager to have it, but I'm trying to work through relatively low-hanging fruit first based on the work I've already done before I dive into hard-core code path analysis required for a good method extraction refactoring. It's close, though!

  4. Scott Wells reporter

    Just released with extract constant and occurrences support for both extract variable and extract constant. I'm actively working on extract method now and, barring unforeseen circumstances, will include it in the next feature release (hopefully in the next week or two).

  5. Scott Wells reporter

    FYI, the latest build ( includes an extract method refactoring. It doesn't support occurrences yet, but I'll address that ASAP. Please let me know if you have any issues using it.

  6. Log in to comment