How can I resolve to reference a twirl generated templated class in Scala -IDE?

Using twirl to generate a template class. Everything works fine with sbt and webpages render.

I am using Scala -IDE for development. And in Scala -IDE the reference to the template class ie "html.test ()", test is the name of the template, shows up as an error.

This is mistake:

Description Type of path to resource

missing or invalid dependency found while loading the test.class class file. Could not access the api term in the .twirl meaning because it (or its dependencies) is missing. Check your assembly definition for missing or conflicting dependencies. (Re-run with -Ylog-classpath

to see the problematic classpath.) A full rebuild may help if "test.class" was compiled against an incompatible version of .twirl. ApiService.scala / api / src / main / scala / com / komma / api / rest line 97 Scala Problem.

I did a clean one and now it gives a "not found: value html" error.

Is there a way to resolve this error in the Scala IDE?

Thank.

+3


source to share


2 answers


Redo sbt eclipse

added target/scala-2.11/twirl/main

as source folder which resolved compilation errors for me.



0


source


For my configuration, twirl sbt eclipse

did not add the twirl output directory as the source folder. Adding target/scala-2.11/twirl/main

to the build path of the eclipse project using the Add Folder button under Java Build Path manually was my solution.



0


source







All Articles