Reputation: 4534
I'm finding that IntelliJ IDEA 12 doesn't understand changes to Scala templates. For example, suppose I have index.html.scala with this:
@(message: String)
And my controller calls it using:
return ok(index.render("Your new application is ready."));
And then I change the template to be:
@(message: String, foo: String)
And the controller to be:
return ok(index.render("Your new application is ready.", "foo"));
I'm finding that IDEA will mark the controller code as red, claiming that I have an extra argument ("foo") that I shouldn't have. It isn't until I hit the page and Play recompiles the template that the error highlighting goes away.
Of course, this is a big problem because the whole point of IDEA's excellent syntax highlighting is to allow me to ensure my code is good before I load up the browser. The way the current behavior works, my flow is code->reload->check errors instead of the preferred code->check errors->reload.
Anyone else experiencing this?
Upvotes: 1
Views: 946
Reputation: 55798
By default Play waits for next request (i.e. manual refresh of the page in the browser) to involve hot-reload (and recompile changed elements).
Run your app with play ~run
, so it will be reloading right after file's saving. and changed params will be visible to Idea 12 just in next few seconds
Upvotes: 1
Reputation: 27
i just typed it into a google : http://plugins.intellij.net/plugin?pluginId=7080
Upvotes: -2