Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Wiki Markup
{redirect:https://www.jetbrains.com/idea/help/creating-and-running-your-scala-application.html

...

|delay

...

=0}

Note
iconfalse

See also the tutorial Getting Started with Play 2.0 to learn how to create web applications with Scala.

...

Before you create your first Scala application make sure

Scala
span
classid
Wiki Markup
{span:class=id}Scala{span}
plugin is installed and enabled via
span
classshortcut
Settings
Plugins
span
classshortcut
Wiki Markup
{span:class=shortcut}Settings{span}
Wiki Markup
{span:class=shortcut}Plugins{span}
.

Youtube
height360
width640
videofHgAwYd3KAE

2. Create Scala project with project wizard

Open

Project Wizard
span
classshortcut
Wiki Markup
{span:class=shortcut}Project Wizard{span}
and select Scala template. Specify home directory for Scala. If you don't have it, you can get it via Download button.

...

3. Check project libraries

Open

Project Structure
span
classshortcut
Wiki Markup
{span:class=shortcut}Project Structure{span}
and check the project libraries. Here you can configure additional libraries, e.g. ScalaTest or any others.

...

Check compiler settings

In

Scala Facet
span
classshortcut
Wiki Markup
{span:class=shortcut}Scala Facet{span}
settings you can check Compiler options
span
classshortcut
Wiki Markup
{span:class=shortcut}Compiler options{span}
.

4. Create object

The easiest way to create Scala file, worksheet or script is to use

span
classshortcut
Ctrl
+
span
classshortcut
N
shortcut from
span
classshortcut
Project View
or Navigation Bar
span
classshortcut
Wiki Markup
{span:class=shortcut}Ctrl{span}
+
Wiki Markup
{span:class=shortcut}N{span}
shortcut from
Wiki Markup
{span:class=shortcut}Project View{span}
or
Wiki Markup
{span:class=shortcut}Navigation Bar{span}
.

Choose between class, object and trait with

span
classshortcut
Up
and Down
span
classshortcut
Wiki Markup
{span:class=shortcut}Up{span}
and
Wiki Markup
{span:class=shortcut}Down{span}
arrows.

5. Run application

The fastest way to run the code at cursor is to use

span
classshortcut
Ctrl
+
span
classshortcut
Shift
+ F10
span
classshortcut
Wiki Markup
{span:class=shortcut}Ctrl{span}
+
Wiki Markup
{span:class=shortcut}Shift{span}
+
Wiki Markup
{span:class=shortcut}F10{span}
shortcut.

Alternatively you can use the context menu.

...