Environment: Java 8, Scala 10, play 2.3.0 sbt plugin, scala ide kepler Version: 4.3.0
Issue: 1. Generated classes for "index.scala.html" and my own created new templates is populating properly into "/my-first-app/target/scala-2.10/classes_managed/views/html" folder but while writing code into application controller I am not able to see these class when I tried to import classes individually instead of import views.html.* but I am not able to do that its not showing generated class I don't know why?
What I have tried:
After trying all still I am not able to import classes individually for any of xyz.scala.html file.
Issue 2: Getting multiple weird errors in xyz.scala.html syntax error for e.g.
Code snippet:
@(title: String)(content: Html) --> Error
<!DOCTYPE html>
<html>
<head>
<title>@title</title>
<link rel="stylesheet" media="screen" href="@routes.Assets.at("stylesheets/main.css")">
<link rel="shortcut icon" type="image/png" href="@routes.Assets.at("images/favicon.png")">
<script src="@routes.Assets.at("javascripts/hello.js")" type="text/javascript"/>
</script>
</head>
<body>
@content
</body>
</html>
Error:
Multiple annotations found at this line: *too many arguments for constructor Object: ()Object *object templates is not a member of package play *type Template2 is not a member of package play.api.templates *not found: type BaseScalaTemplate
It is really annoying while development its slow downs the development speed.
Try again! Scala ide just got an update and at least the nightly version supports play 2.3.
The update site for eclipse kepler is
http://download.scala-ide.org/sdk/lithium/e38/scala211/dev/site/
In eclipse go to project>properties>play2
and remove all the play.api.templates
imports, those don't exist anymore.
ps: on a side note: i've started a google doc with notes on play+eclipse, feel free to add your own findings. Play 2.3 and Eclipse
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With