سؤال

Is there a way to get Play to use the compiled classes from Eclipse, and to get Eclipse to generate the Scala classes which hide behind the templates?

I run the Play console (play debug) and then from the console, I use "~ run" to continuously compile.

The problem is:

1) Eclipse needs refreshing when I make changes to the HTML templates, because it is the Play Console which is regenerating the Scala class, and Eclispe knows nothing about it.

2) Both Eclipse and Play are compiling classes, which is making my CPU heat up a lot, unnessarily. But just turning off the Eclipse auto-build doesn't help, because I still get a bunch of red underlines where Eclipse thinks there are compiler problems. So I have to do a refresh, and a manual build.

These lead to a bad programmer experience, so, is there something I am doing wrong or do I have to wait until someone develops an Eclipse Plugin which replaces the external Play console? Or should I revert to vi?

هل كانت مفيدة؟

المحلول

You can set Eclipse to automatically refresh your workspace when file changed on the filesystem:

Window > Preferences > General > Workspace > Refresh using native hooks or polling

Works fine with me.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top