Latest Play 2 plugin breaks controller <-> template linking?

I updated to the latest play and scala plugin today and the play arrow that jumps from a template call in a scala controller to the template no longer shows.

Anyone else seeing this, if so any solution?




resolve system for templates was updated, now ctrl+click on the template call jumps to the actual template, not to the compiled code, so arrow marker isn't necessary anymore.

Best regards,
Dmitry Naydanov


Dimitry- thanks for the info. it seems the functionality does not work reliably. When I ctrl+click on a template in scala code, intellij reports 'multiple implementations'. Please see attached screenshot.


Screen Shot 2013-06-28 at 12.52.27 AM.png

Looks like you have produced by play2 template compiler code in your source roots. It leads to wrong resolve because both template and compiled code are considered suitable. As workaround I can suggest exluding that source roots (usually it is  target/[scala-2.10 | scala-2.9]/src_managed/main). It contains only compiled code that was used for resolve for templates and reverse routes later, so excluding doesn't affect anything else. Otherwise you can wait for today's nightly, excluding of those roots there can be done automatically.

Best regards,
Dmitry Naydanov


That worked perfectly. Thanks Dmitry!


I'm still getting this behavior.  I've deleted the .idea and .idea_modules directories and rerun from the play console: "idea no-sbt-build-module with-sources=yes".  From there, it mostly works, but I have to manually select the scala library and manually attach sources.  I also get the message:

           You have useless source roots which may corrupt resolve for play 2 framework in your project:

If I select delete (or exclude manually), then it does not recognize the view at all, and if I leave it there, I get to the compiled code and not the template.


Please sign in to leave a comment.