I'm getting an error on a recently created Play! Project and I don't know why. Can any one help me? The error I'm getting is the following: "index cannot be resolved"
I have another question also, in the play! framework web, it says the following and I have no idea how to do it, can someone explain to me a little what that is and how to do it?:
If you do not want to install Scala IDE and have only Java sources in your > project, then you can set the following:
EclipseKeys.projectFlavor := EclipseProjectFlavor.Java // Java project. Don't expect Scala IDE
EclipseKeys.createSrc := EclipseCreateSrc.ValueSet(EclipseCreateSrc.ManagedClasses, EclipseCreateSrc.ManagedResources) // Use .class files instead of generated .scala files for views and routes
EclipseKeys.preTasks := Seq(compile in Compile) // Compile the project before generating Eclipse files, so that .class files for views and routes are present
First question)
Eclipse doesn't know about your views (also called templates) yet. They are Scala classes that will be generated from your actual my_view_name.scala.html
files during compiling. So after you compiled you just have to run activator eclipse
(or '
play eclipse
with older versions of Play) and those errors magically disappear.
Second question)
I've never set those. I guess you have to set in your project/plugins.sbt
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")
and, if you use no Scala (Java-only), in your build.sbt
EclipseKeys.projectFlavor := EclipseProjectFlavor.Java // Java project. Don't expect Scala IDE
EclipseKeys.createSrc := EclipseCreateSrc.ValueSet(EclipseCreateSrc.ManagedClasses, EclipseCreateSrc.ManagedResources) // Use .class files instead of generated .scala files for views and routes
EclipseKeys.preTasks := Seq(compile in Compile) // Compile the project before generating Eclipse files, so that .class files for views and routes are present
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