diff --git a/src/sphinx/tutorials/index.rst b/src/sphinx/tutorials/index.rst index 6501b82d..3668969b 100644 --- a/src/sphinx/tutorials/index.rst +++ b/src/sphinx/tutorials/index.rst @@ -5,7 +5,7 @@ Tutorials :maxdepth: 2 m2eclipse/index.rst - play20scalaide20/index.rst + play/index.rst lift24scalaide20/index.rst continuations-plugin/index.rst scalac-trunk/index.rst diff --git a/src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-01.png b/src/sphinx/tutorials/play/images/play20-scalaide20-01.png similarity index 100% rename from src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-01.png rename to src/sphinx/tutorials/play/images/play20-scalaide20-01.png diff --git a/src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-02.png b/src/sphinx/tutorials/play/images/play20-scalaide20-02.png similarity index 100% rename from src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-02.png rename to src/sphinx/tutorials/play/images/play20-scalaide20-02.png diff --git a/src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-03.png b/src/sphinx/tutorials/play/images/play20-scalaide20-03.png similarity index 100% rename from src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-03.png rename to src/sphinx/tutorials/play/images/play20-scalaide20-03.png diff --git a/src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-04.png b/src/sphinx/tutorials/play/images/play20-scalaide20-04.png similarity index 100% rename from src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-04.png rename to src/sphinx/tutorials/play/images/play20-scalaide20-04.png diff --git a/src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-05.png b/src/sphinx/tutorials/play/images/play20-scalaide20-05.png similarity index 100% rename from src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-05.png rename to src/sphinx/tutorials/play/images/play20-scalaide20-05.png diff --git a/src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-06.png b/src/sphinx/tutorials/play/images/play20-scalaide20-06.png similarity index 100% rename from src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-06.png rename to src/sphinx/tutorials/play/images/play20-scalaide20-06.png diff --git a/src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-07.png b/src/sphinx/tutorials/play/images/play20-scalaide20-07.png similarity index 100% rename from src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-07.png rename to src/sphinx/tutorials/play/images/play20-scalaide20-07.png diff --git a/src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-08.png b/src/sphinx/tutorials/play/images/play20-scalaide20-08.png similarity index 100% rename from src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-08.png rename to src/sphinx/tutorials/play/images/play20-scalaide20-08.png diff --git a/src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-09.png b/src/sphinx/tutorials/play/images/play20-scalaide20-09.png similarity index 100% rename from src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-09.png rename to src/sphinx/tutorials/play/images/play20-scalaide20-09.png diff --git a/src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-10.png b/src/sphinx/tutorials/play/images/play20-scalaide20-10.png similarity index 100% rename from src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-10.png rename to src/sphinx/tutorials/play/images/play20-scalaide20-10.png diff --git a/src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-11.png b/src/sphinx/tutorials/play/images/play20-scalaide20-11.png similarity index 100% rename from src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-11.png rename to src/sphinx/tutorials/play/images/play20-scalaide20-11.png diff --git a/src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-12.png b/src/sphinx/tutorials/play/images/play20-scalaide20-12.png similarity index 100% rename from src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-12.png rename to src/sphinx/tutorials/play/images/play20-scalaide20-12.png diff --git a/src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-13.png b/src/sphinx/tutorials/play/images/play20-scalaide20-13.png similarity index 100% rename from src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-13.png rename to src/sphinx/tutorials/play/images/play20-scalaide20-13.png diff --git a/src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-14.png b/src/sphinx/tutorials/play/images/play20-scalaide20-14.png similarity index 100% rename from src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-14.png rename to src/sphinx/tutorials/play/images/play20-scalaide20-14.png diff --git a/src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-15.png b/src/sphinx/tutorials/play/images/play20-scalaide20-15.png similarity index 100% rename from src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-15.png rename to src/sphinx/tutorials/play/images/play20-scalaide20-15.png diff --git a/src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-16.png b/src/sphinx/tutorials/play/images/play20-scalaide20-16.png similarity index 100% rename from src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-16.png rename to src/sphinx/tutorials/play/images/play20-scalaide20-16.png diff --git a/src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-17.png b/src/sphinx/tutorials/play/images/play20-scalaide20-17.png similarity index 100% rename from src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-17.png rename to src/sphinx/tutorials/play/images/play20-scalaide20-17.png diff --git a/src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-18.png b/src/sphinx/tutorials/play/images/play20-scalaide20-18.png similarity index 100% rename from src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-18.png rename to src/sphinx/tutorials/play/images/play20-scalaide20-18.png diff --git a/src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-19.png b/src/sphinx/tutorials/play/images/play20-scalaide20-19.png similarity index 100% rename from src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-19.png rename to src/sphinx/tutorials/play/images/play20-scalaide20-19.png diff --git a/src/sphinx/tutorials/play/images/refresh-on-access.png b/src/sphinx/tutorials/play/images/refresh-on-access.png new file mode 100644 index 00000000..5e87b286 Binary files /dev/null and b/src/sphinx/tutorials/play/images/refresh-on-access.png differ diff --git a/src/sphinx/tutorials/play20scalaide20/index.rst b/src/sphinx/tutorials/play/index.rst similarity index 79% rename from src/sphinx/tutorials/play20scalaide20/index.rst rename to src/sphinx/tutorials/play/index.rst index 2dbd9430..d2d5c15c 100644 --- a/src/sphinx/tutorials/play20scalaide20/index.rst +++ b/src/sphinx/tutorials/play/index.rst @@ -1,4 +1,4 @@ -Setup and use Play framework 2.0 in Scala IDE 2.0 +Setup and use Play framework 2.1 in Scala IDE 3.0 ================================================= What is in this guide? @@ -9,7 +9,7 @@ This guide will show you how to configure a Play web application to import it in Prerequisites ............. -* `Eclipse`_ 3.6.2 (Helios) with Scala IDE for Scala 2.9 installed (update site: http://download.scala-ide.org/releases-29/stable/site). +* `Eclipse`_ 3.7 (Indigo) with Scala IDE for `Scala 2.10 installed `_. Check the :doc:`getting started ` page for instructions on how to install Scala IDE. @@ -19,22 +19,22 @@ Prerequisites * No knowledge of the Play framework is required (in this guide). -Setting up Play 2.0 +Setting up Play 2.1 ------------------- To be able to create a Play web application, the Play framework need to be installed. If you have not installed it already, follow this few steps, or use the `Play documentation`_. -* Download Play framework 2.0 from http://www.playframework.org/. +* Download Play framework 2.1 from http://www.playframework.org/. -* Unzip it in your preferred location. Let's say ``/path/to/play20`` for the purpose of this document. +* Unzip it in your preferred location. Let's say ``/path/to/play21`` for the purpose of this document. * For convenience, add the Play folder to your system PATH: .. code-block:: bash - export PATH=$PATH:/path/to/play20 + export PATH=$PATH:/path/to/play21 -Creating a Play 2.0 application +Creating a Play 2.1 application ------------------------------- * In your development folder, ask Play to create a new web application, as a ``simple Scala application``. @@ -72,12 +72,12 @@ Creating a Play 2.0 application :width: 100% :target: ../../_images/play20-scalaide20-05.png -Configuring the Play 2.0 web application for Scala IDE +Configuring the Play 2.1 web application for Scala IDE ------------------------------------------------------ Now that the Play application is running, it needs to be configured so it can be imported into Scala IDE. -Play 2.0-RC1 integrates `sbteclipse`_, which allow to create configuration files of a project for Eclipse. +Play 2.1 integrates `sbteclipse`_, which allow to create configuration files of a project for Eclipse. * First, exit the 'run' mode in Play using ``ctrl-d``. @@ -86,7 +86,7 @@ Play 2.0-RC1 integrates `sbteclipse`_, which allow to create configuration files :width: 100% :target: ../../_images/play20-scalaide20-06.png -* ``eclipsify`` is the command to invoke sbteclipse in Play. (In Play 2.1, the command is ``eclipse``) +* ``eclipse`` is the command to invoke sbteclipse in Play. (or ``eclipse with-source=true`` if you want to also download sources attachment of your dependencies) .. image:: images/play20-scalaide20-09.png :alt: eclipse @@ -100,7 +100,7 @@ Play 2.0-RC1 integrates `sbteclipse`_, which allow to create configuration files :width: 100% :target: ../../_images/play20-scalaide20-10.png -Configuring Scala IDE for the Play 2.0 web application +Configuring Scala IDE for the Play 2.1 web application ------------------------------------------------------ Setting a few preferences in Eclipse will make everything easier to use. @@ -114,10 +114,10 @@ Setting a few preferences in Eclipse will make everything easier to use. * Configure Eclipse so changes on the file system are automatically picked up. - .. image:: images/play20-scalaide20-13.png + .. image:: images/refresh-on-access.png :alt: refresh automatically :width: 100% - :target: ../../_images/play20-scalaide20-13.png + :target: ../../_images/refresh-on-access.png * If you don't have the Web Development Tools for Eclipse installed, Eclipse opens ``.html`` files in a web browser. Configure it to use the ``Text Editor`` instead. @@ -131,29 +131,13 @@ Importing the Play web application into Scala IDE Everything is setup, it is time to import the project in the IDE. -* Import the Play 2.0 application as an ``Existing Projects into Workspace``. +* Import the Play 2.1 application as an ``Existing Projects into Workspace``. .. image:: images/play20-scalaide20-15.png :alt: import project :width: 100% :target: ../../_images/play20-scalaide20-15.png -* The configuration generated by sbteclipse is working fine in Eclipse, but it is not optimal when using with Scala IDE. - - Add the ``target/src_managed/scala`` folder as a source folder. - - .. image:: images/play20-scalaide20-20.png - :alt: add the managed sources folder - :width: 100% - :target: ../../_images/play20-scalaide20-20.png - -* And remove the ``classes_managed`` folder for the build path. - - .. image:: images/play20-scalaide20-21.png - :alt: remove managed classes folder - :width: 100% - :target: ../../_images/play20-scalaide20-21.png - * Everything is good, everything compiles. .. image:: images/play20-scalaide20-16.png @@ -181,9 +165,7 @@ Let's change the main page to display a quote instead of the default page. package models - case class Quote(val text: String, val author: String) { - - } + case class Quote(text: String, author: String) * Add an extra parameter to the ``index.scala.html`` view and update the layout. @@ -191,7 +173,7 @@ Let's change the main page to display a quote instead of the default page. @(message: String, quote: models.Quote) - @main("Welcome to Play 2.0") { + @main("Welcome to Play 2.1") {

@quote.text - @quote.author

@@ -226,9 +208,9 @@ Let's change the main page to display a quote instead of the default page. Going further ------------- -You now have all you need to create great web applications with Play 2.0 and Scala. +You now have all you need to create great web applications with Play 2.1 and Scala. -For more information about Play 2.0, check out the `embedded documentation`_. +For more information about Play 2.1, check out the `embedded documentation`_. For more information about Scala, go to the `documentation website`_ or get the downloadable `eBook`_. @@ -241,11 +223,10 @@ Please use github tickets and pull requests system for feedback. Luc Bourlier - `+Luc Bourlier`_ `@sky1uc`_ -.. _#1000907: http://www.assembla.com/spaces/scala-ide/tickets/1000907 .. _Scala IDE: http://www.scala-ide.org .. _Scala IDE documentation project: https://github.com/scala-ide/docs .. _Eclipse: http://www.eclipse.org/ -.. _Play documentation: http://www.playframework.org/documentation/2.0/Installing +.. _Play documentation: http://www.playframework.com/documentation/2.1.0/Home .. _sbteclipse: https://github.com/typesafehub/sbteclipse .. _embedded documentation: http://localhost:9000/@documentation/Home .. _documentation website: http://docs.scala-lang.org/ diff --git a/src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-20.png b/src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-20.png deleted file mode 100644 index 5d584a1b..00000000 Binary files a/src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-20.png and /dev/null differ diff --git a/src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-21.png b/src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-21.png deleted file mode 100644 index b12474a2..00000000 Binary files a/src/sphinx/tutorials/play20scalaide20/images/play20-scalaide20-21.png and /dev/null differ