-
Notifications
You must be signed in to change notification settings - Fork 31
Route Editor
Route files are responsible of translating HTTP request into Action.
Below follows the set of features that are currently supported for Route files.
Syntax Highlighting for
- HTTP method
- URI static part
- URI dynamic part
- Action package part
- Action class part
- Action method name part
- Action method arguments part
- Comments

Also it has preference page for syntax coloring.

You can use CTRL+SHIFT+F (COMMAND+SHIFT+F on Mac OSX) to format your route file.

You can modify the spaces between columns in the corresponding preference page.

Using Ctrl/Cmd+Click, the hyperlink support allows to open the declaration of action methods. It will be directed to the appropriate controller method, by matching the argument types.

Hyperlinking to Scala methods is available in the nightly builds, and will be part of 0.2.0.
Each section of a route entry has appropriate completion proposals. Just hit Ctrl-Space or CMD-Space to trigger completion.



Note that the controller method completion only shows methods that return Action or Result, to minimize the noise.
This feature allows to quickly add a route entry to an existing controller method, either in Java or Scala. To trigger the quick assist, press Ctrl-1 (or CMD-1 on Mac OS) while the caret is on a method definition. If the method definition returns an Action (or Result for Java), you should see a menu offering to add an entry to any route file in the project.

After choosing the routes file, the editor is put in a special linked mode that allows easy TAB-navigation between the different sections of a route entry. Each entry is populated with a sensible default.
