如何让Eclipse看到Play中的变化!编译模板? [英] How to make Eclipse see the changes in Play! compiled templates?
问题描述
我遇到的问题是,当我在Scala模板中进行更改时,我的Java控制器看不到它,Eclipse标记代码无效。例如:
我在索引模板中添加了第二个参数
@(message:String,nesto:Integer)
当我尝试从控制器呈现我的文件,以下行显示错误,因为Eclipse仍然认为index.render需要一个String。
return ok(index。 render(你的新应用程序准备就绪,2));
我打开了Eclipse中的工作空间,并播放eclipsify会自动将classes_managed目录添加到构建路径
我做了以下事情:
- 如你所做,我打开工作区自动刷新(在设置中,通用 - >工作区,然后选择使用本机挂接或池刷新)
- 我删除了
classes_managed
由生成的目录,从我的构建路径播放eclipsify
,我用添加外部类文件夹手动添加它
然后它对我有用。
似乎有一个错误与 eclipsify
命令。
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 that when I make a change in the Scala template, my Java controllers can't see it, and Eclipse marks the code as invalid. For example:
I added a second parameter in my index template
@(message: String, nesto:Integer)
When I try to render my file from the controller, the following line displays an error, because Eclipse still thinks that the index.render takes one String.
return ok(index.render("Your new application is ready.",2));
I turned on the workspace refreshing in Eclipse, and play eclipsify automatically added the classes_managed directory to the build path.
I did the following things :
- As you did, I turned on the workspace auto-refresh (in settings, General -> Workspace, then select "Refresh using native hooks or pooling")
- I removed the
classes_managed
directory generated byplay 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.
这篇关于如何让Eclipse看到Play中的变化!编译模板?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!