How to make Eclipse see the changes in Play! compiled templates?

后端 未结 4 1854
温柔的废话
温柔的废话 2020-12-03 07:05

So, I\'m trying out Play 2 with Eclipse. I create a new project, compile it, run eclipsify and import it into Eclipse. So far so good.

The problem I\'m having is tha

相关标签:
4条回答
  • 2020-12-03 07:45

    The trick is to have Play building automatically in the background (template files are not currently built by Eclipse, so you need Play to translate those for you). It's all explained in detail here:

    [dead link] http://scala-ide.org/docs/tutorials/play20scalaide20/index.html

    [try this one] http://scala-ide.org/docs/tutorials/play/index.html#installing-the-scala-ide-play2-plug-in

    0 讨论(0)
  • 2020-12-03 07:45
    1. Run 'play eclipse' on the command line
    2. In Eclipse, refresh your Project via hitting F5
    0 讨论(0)
  • 2020-12-03 07:56

    I did the following things :

    1. As you did, I turned on the workspace auto-refresh (in settings, General -> Workspace, then select "Refresh using native hooks or pooling")
    2. I removed the classes_managed directory generated by play eclipsify from my build path, and I added it manually using "Add external class folder"

    And then it worked for me. It seems that there is a bug with the eclipsify command.

    0 讨论(0)
  • 2020-12-03 08:02

    For Java Play Framework v2.4.6 (activator v1.3.7) with Eclipse Mars:

    Instead of @(message: String, nesto:Integer) , have you tried this @(message: String)(nesto: Integer)?

    So that you will not have a "can not resolve error" with your index.render(), you can add this <classpathentry kind="lib" path="target/scala-2.11/classes"/> to your .classpath or right-click on your project -> Build Path -> Configure Build Path -> Add Class Folder and make it point to target/scala-2.11/classes.

    0 讨论(0)
提交回复
热议问题