playframework/Play20 — pull request #579 by jroper (2012-11-26 00:33:58+00:00)
Title: [#873] Fixed bugs in route includes reverse routing

This fixes a few bugs with reverse routing when using route includes:

* Two controllers/routes.java classes might be generated, one for the included routes, one for the main routes. This class is now placed in its own package.
* The Routes.prefix mechanism was broken for reverse routing, since Routes is defined in the root package, and hence was hiding import inc.Routes, so the prefix was always the prefix for the main routes file. This was interesting to fix, since there were all sorts of issues with having classes in the root package (eg, you can't alias a class in the root package, neither import {Routes => MyRoutes} or import _root_.{Routes => MyRoutes} would work). I ended up going with import Routes.{prefix => _prefix, defaultPrefix => _defaultPrefix}.
* Defining two routes files in one project didn't work, since they both generated the same routes_routing.scala and routes_reverseRouting.scala files. These are now generated in a directory that matches the package.