backchatio/xsbt-scalate-generate — pull request #23 by shinnya (2014-05-30 09:06:10+00:00)
Title: Fixes a problem that xsbt-scalate-generate doesn't compile template files correctly when used with Play! Framework in development mode.

## problem
I have fixed a problem that `xsbt-scalate-generate` doesn't compile template files correctly when used with Play! Framework and `scalateOverwrite` setting is false.
This problem seems to be caused by the hot-reloading feature provided by Play! Framework. Play! server launched by `play run` executes `sourceGenerators in Compile` task _twice_ even if nothing is modified(I don't know why...). In my investigation, `xsbt-scalate-generator` correctly compiles all template files and `ScalatePlugin.scalateSourceGeneratorTask` returns generated scala files first time, but second `sourceGenerators in Compile` task seems to delete generated scala files.

## changes
* Added `CompileTarget` trait and its sub classes to distinguish the state of template files and scala files to know whether we should compile the template file or not.
* Now `Generator.execute` returns a scala file which is already compiled even if its corresponding template file is not modified.(`Generator.execute` doesn't compile these unmodified files.)

## test my change
I created a repository for testing. The repository is https://github.com/shinnya/xsbt-scalate-generator-sample. How to test my changes is described in `README.md` in this repository.

## how should I write tests?
I want to write some tests for this change. Which testing library should I use?

Thanks.