22c:022 Object-Oriented Software Development
Fall 2013

Internal Resources

Several of the tools used in this course will be installed on the machines in the CS labs.

All tools below are installed on the Linux machines of the DIVMS labs. To use those installations, you need first to log in to a lab machine. You can do that either

  • directly, by using one of the linux desktops in 301MLH, or
  • remotely from any computer connected to the internet and running the NoMachine client
    (see the CSG Linux help pages for the latter).

All the tools below are freely available and you can download and installed them on your own computer if you want. See the External Resources section for pointers.

Scala

  1. Scala interpreter
  2. SBT build tool
  3. ScalaEdit IDE

Scala Interpreter

Working with the Scala interpreter on the CS Linux machines

  1. Open a terminal, for instance by selecting Applications|System Tools|Terminal from the top menu of the Gnome Desktop.

  2. At the terminal's prompt enter:
    scala

  3. You can now interact with the interpreter by entering any Scala code you wish.

The scala compiler is also available scalac at the terminal. However, ScalaEdit is a more convenient tool for developing and compiling Scala projects.



Simple Build Tool

This application will be most useful for the class projects. You will not need it for simple homework assignments. More on it will be posted later.

ScalaEdit

ScalaEdit is a simple IDE for Scala that provides source creation and editing functionalities, syntax highlighting, compilation and testing via an integration with SBT.

Working with ScalaEdit on the CS Linux machines

  1. Open a terminal, for instance by selecting Applications|System Tools|Terminal from the top menu of the Gnome Desktop.

  2. At the terminal's prompt enter:
    /group/class/c_022/scalaedit

ScalaEdit maintains at all time a root directory for a Scala project. The root can be (re)set by selecting Project|Change Root... from ScalaEdit's top menu.

Using the Scala interpreter within ScalaEdit

It is possible to open one or more terminals inside ScalaEdit running the Scala interpreter. Jus select Terminal|New Scala Terminal from ScalaEdit's top menu.

Using SBT within ScalaEdit

ScalaEdit has some integration with SBT. It allows you to open one or more SBT terminals internally by selecting Terminal|SBT Terminal|Version 0.11 from its top menu.

When you open an SBT terminal, SBT will be set up automatically to use the current ScalaEdit project root. If you change the project root in ScalaEdit, however, you must open a new SBT terminal to work on that project.

If running compile in an internal SBT terminal produces errors, ScalaEdit will present them in an adjacent window. Clicking on an error in that window will move the cursor in the text edit window to the error's location in the source file (as seen in this screen shot).





Copyright: Cesare Tinelli, The University of Iowa, 2013