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?

Thanks!

6 comments

Hello,

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

0

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.

Thanks,
Justin



Attachment(s):
Screen Shot 2013-06-28 at 12.52.27 AM.png
0

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

0

That worked perfectly. Thanks Dmitry!


0

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:

Play2:
           You have useless source roots which may corrupt resolve for play 2 framework in your project:
           [ProjectHome]\target\scala-2.10\src_managed\main
     [ProjectHome]\target

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.

0

Please sign in to leave a comment.