New Refactorings Around the Call Hierarchy in IntelliJ IDEA 14.1


Sometimes it is convenient to work with all methods in a call hierarchy in the same way: add or remove a parameter throughout the entire call hierarchy, make the whole hierarchy static, or delete the whole call hierarchy completely.

IntelliJ IDEA 14.1 makes this process simpler.

  1. Change Signature

It’s probably not a very well-known feature that it’s possible (since IntelliJ IDEA 4?) to add a parameter or an exception to all methods in the call hierarchy with a single click:

Screen Shot 2015-01-14 at 10.03.26.png

Result is:


  1. Safe Delete Parameter

If a parameter is only passed through the call hierarchy and has no usages outside of it, Safe Delete will automatically suggest other methods in the hierarchy where the parameter could be deleted.

Screen Shot 2015-01-14 at 09.56.53.png

Selecting all methods would result in:

  1. Make Method Static

If you make some method static, and some of it’s callers do not contain any other references to instance members, IntelliJ IDEA will suggest these callers to make them also static.



  1. Safe Delete of Method Call Hierarchy

Much the same way, if you delete a method, Safe Delete automatically checks if some of the callees inside the methods body are no longer used and will suggest to delete them also – so you don’t need to apply Safe Delete for each method in the call hierarchy manually.



And all this without any additional actions to learn!

This entry was posted in EAP Releases, New Features and tagged , , . Bookmark the permalink.

One Response to New Refactorings Around the Call Hierarchy in IntelliJ IDEA 14.1

  1. OlegYch says:

    can we have the same for scala please

Leave a Reply

Your email address will not be published. Required fields are marked *