0

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.
Makoto
  • 104,088
  • 27
  • 192
  • 230
Olivier Tonglet
  • 3,312
  • 24
  • 40
  • Just curios, what is the advantage of JRebel over super dev mode? Does JRebel do anything that super dev mode can't do? – Anton Arhipov Oct 08 '13 at 21:49
  • Hi, JRebel guy. I guess you want me to say why I love JRebel isn't it :) ? We are writing a big enterprise app with complex workflows. JRebel allows us to reload parts of the workflow or even the part I'm located on without having to reload the app. This would otherwise force developpers to restart complex wizards, which is a pain even with Selenium's help. From a user perspective, JRebel handles client and server-side code the same way. Super Dev Mode recompiles the whole app and JRebel is faster cuz it only recompiles a few files (at least with Eclipse). – Olivier Tonglet Oct 09 '13 at 07:07
  • Well, my goal is actually is to figure out if we want to spend time adding special support for GWT despite there's a super dev mode. If super dev mode works for people we wouldn't spend time on GWT integration - simple. BTW, JRebel does recompile anything, it only uses the results of compiler (javac, ejc) and updates the classes and resources in the running app. – Anton Arhipov Oct 09 '13 at 09:54

1 Answers1

0

-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.

Anton Arhipov
  • 6,479
  • 1
  • 35
  • 43
  • Thanks for your answer. I don't know why the classes are reloaded. I'm new to the IDEA make process. But I know that's the core of the problem here. There is no GWT.create call. Yet some resources are injected using GIN. When you say GWT.create has to be re-run, do you mean that if there is a GWT.create call in my code all classes created that way will have to be reloaded ? Does GIN injection causes the same behavior ? Anyway thanks for the advice. I'll try to contact JRebel support if you prefer answering on another forum. – Olivier Tonglet Oct 09 '13 at 06:57
  • So I went to JRebel support. According to them using -Drebel.check_class_hash=true with IntelliJ is the correct behavior. http://zeroturnaround.com/forums/topic/jrebel-constantly-reloading-every-client-side-class-file-with-gwtintellij/#post-37265 @Anton Thanks for your feedback. – Olivier Tonglet Oct 10 '13 at 09:17