Pergunta

We're considering about switching from Eclipse to IntelliJ IDEA. We have to use JRebel so we don't have to restart the app each time we change a line of code.

Every time I change one line of code in one .java file, and after invoking the IntelliJ make process on that particular file, JRebel seem to reload a whole bunch of client-side classes.

With Eclipse, this brutal reloading behavior might happen sometimes, but in most cases the class reloading process is much faster !

I think that I'm missing something. Does anyone with experience using IntelliJ and JRebel know how to have JRebel plugin reload one single class when nothing more is needed ?

Any help would be greatly appreciated !

  • Note 1 : I know super dev mode could help but I'd like to have the JRebel plugin work first.
  • Note 2 : the VM arg -Drebel.check_class_hash=true helps too, but I don't think the plugin is meant to work that way.
Foi útil?

Solução

-Drebel.check_class_hash=true was introduced for this kind of cases. But you what you should actually check is why your client side classes are reloaded. JRebel reloads classes when the timestamp of the class file changes, or, if -Drebel.check_class_hash=true is set it will check for the hash in addition to timestamp.

So the very first thing to look for is when you make a single class, did the other classes' timestamps, that JRebel reloaded, change? Maybe IntelliJ's build for GWT just touches too many files during compile time? Or maybe you could just compile the single class, the one that you have actually changed.

One assumption that I have, is if the the above is not true, then there's GWT.create somewhere in your code that you're changing and it has to be re-run during make since otherwise the changes you have made wouldn't be propagated. This would only be triggered by the make procedure and JRebel doesn't trigger re-running GWT.create on its own. This is just an assumption, so please do not take it 100% seriously.

You could try contacting JRebel support as well.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top