0

I would like to automatize this task on intelliJ (under Run menu)

enter image description here

I usually have to run this task when I'm changing some code while running my app in debug mode.

I don't want to rebuild / recompile the whole project as some answers suggest but only do this action, is it possible to do it automatically let's say when I save my file ?

I understand that there is a difference between rebuild / recompile and reload, stop me if I am wrong.

There are some similar questions like this one, but none of them answers my question, see:

Debugging in IntelliJ (Reloading changed classes)

stbr
  • 227
  • 1
  • 12
  • Possible duplicate of [Debugging in IntelliJ (Reloading changed classes)](https://stackoverflow.com/questions/32692104/debugging-in-intellij-reloading-changed-classes) – Petr Rastegaev Aug 29 '19 at 20:47

1 Answers1

0

One way to do it is to go to:

  1. Edit => Macros => Start recording macro => ctrl + S then Run => Reload Changed Classes

  2. Edit => Macros => Stop recording macro (and give it a name, let's say Save and reload)

  3. File => Settings => Keymap => find your macro in this list, and bind the key you want, in my case ctrl + S

Now when I press CTRL + S to save my file it also reloads the changed classes !

stbr
  • 227
  • 1
  • 12