简体   繁体   中英

Is it possible to setup Reload Changed Classes automatically in IntelliJ IDEA?

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

在此处输入图片说明

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)

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 !

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM