Yesterday I switched to IntelliJ IDEA from Eclipse.
I am using JRebel with WebSphere Server 7 as well.
Everything now seems to be working somewhat fine, except that when I modify a Java file, and hit save, IntelliJ does not re-compile the file, in order for JRebel to pick it up.
The Eclipse "Build Automatically" feature resolved this issue.
In IntelliJ IDEA, I have to hit CTRL+SHIFT+9 to re-compile the relevant class for JRebel to pick it up. If changes are done across two files, I have to do this on each and one of them and since IntelliJ uses the save all mechanism, its pretty hard to know what to recompile manually which I am not really interested in doing either.
Isn't there a way to make IntelliJ to do this on its own?
You can keymap
ctrl+s
to save AND compile in one step. Go to the keymap settings and search forCompile
.I managed to solve this using macros.
I started recording a macro:
Name it something useful like, "SaveAndMake".
Now just remove the Save all keybinding, and add the same keybinding to your macro!
So now, every time i save, it saves and makes a dirty compile, and jRebel now detects all changes correctly.
Use the Reformat and Compile plugin (inspired by the Save Actions plugin of Alexandre DuBreuil):
https://plugins.jetbrains.com/plugin/8231?pr=idea_ce
At the moment I am only offering a jar file, but this is the most important part of the code:
Not enough points to comment on an existing answer, but similar to some people above, I wound up just adding a macro & keymap to Organize Imports / Format / SaveAll / FastReload(F9) / Synchronize.
The synchronize is added as it seems to be the only way I can also see updates in resources modified by external build tools / watchers (i.e., webpack).
The process is slower than eclipse - and for the external file refresh often have to run the command multiple times - but suppose I can live with it.
Please follow both steps:
1 - Enable Automake from the compiler
make project automatically
Make Project automatically
feature2 - Enable Automake when the application is running
Registry
compiler.automake.allow.when.app.running
and enable it or click the checkbox next to itNote: Restart your application now :)
Note: This should also allow live reload with spring boot devtools.
I ended up recording a Macro to save and compile in one step, and keymap
Ctrl+s
to it.