This week in #Scala (04/11/2011)

Posted by Mark Harrison on Fri, Nov 4, 2011

Welcome to another week in #Scala! There's plenty of blog posts and videos to tell you about this week in addition to various new releases - so I've decided to split the post into two sections:

New Stuff

zsh completion for Scala - Anthony Sloane (@inkytonik) published a project containing zsh definitions for various Scala commands (currently just scalac and scala). Just download and install as per the readme and you're away!

Scala IDE for Eclipse version 2.0.0 beta 12 has been released with a host of changes:

  • Hyperlinking on definitions between dependent projects works correctly.
  • For mixed Scala/Java project, allow to sources’ compilation order (i.e., first Java and then Scala, or the other way around).
  • Improved interoperability of mixed Scala/Java (#1000652, #1000670, #1000678).
  • Fixed a deadlock when the presentation compiler was awaken during builds.
  • Presentation compiler is notified of changes in dependent projects (no spurious errors after rebuild).
  • Fixed issue in the presentation compiler that caused implicit conversions not to be applied (#1000647).
  • Added classpath validator. An error is reported if the scala library is missing or the version is wrong (#1000631).
  • Improved refactoring (better support for organize/add imports). [by Mirko Stocker]
  • Wizard for creating Scala Application uses now trait App instead of the deprecated Application trait. [by Matt Russell]

Click the link for more information.

Slate, a lightweight scala IDE is out. Slate is an editor which integrates with the Scala compiler for auto completion, the Play framework for running tests and server and enables easy execution of Scala applications and Scalatest test cases. The main features include:

  • Syntax coloring: Based on the file’s type, colors the text. Support for JS, CSS, Properties files, XML and YML apart from Scala.
  • Integration with Scala Interpreter
  • Organise Imports: Does not remove any existing imports but will add imports if there were problems found in the last compilation. Also removes duplicate imports, rolls up imports into one where needed and arranges them in alphabetical order.
  • Format File: Indents the code based on opening and closing braces, ensures space around equals sign (“=”), removes extra blank lines and extra spaces at the end of each line.
  • Open a resource: Looks up and opens a file based on its name. The search is incremental so resource list is refreshed with every key stroke.
  • Code Assist: While Slate does not provide a direct code assist, it does provide 2 useful features. You can lookup all methods of a class and select one of those to be injected into your code. Also, you could look up a type name (so for example, if you wanted to use an InputStream, you could type inputs, do a control space, and it will show all types having InputStream in their names! So you could then choose to use FileInputStream or ByteArrayInputStream).
  • Run an application
  • Run Scalatest Test cases: The results are parsed and output is shown in a nice Eclipse Junit style tree fashion.
  • Run Play test cases: This runs “play autotest” and publishes unit test results in tree fashion. The Selenese test cases are run but not shown in IDE. The are available as HTML files in “project path”/test-results directory.
  • Run the Play server from within the IDE!
  • Ability to create different types of Scala and Java classes using templates.
  • A separate window to show console, so if you use a 2 monitor set up, you could dock the console in one and editor in another. The console is slightly translucent so if you are using console on same window as editor, you could watch it while watching your code too!

Blogs and tutorials

  • Jan (@honzam399) has posted some introductory videos on the website.
  • A tweet drew my attention to this excellent stack overflow answer explaining the differences between Scala and Haskell type systems.
  • Eberhard Wolff (@ewolff) posted his useful "Scala and Spring" presentation slides from Jax 2011 London.
  • Check out this great Scalaz introduction by Jordan West (@modestrubyist).
  • The slides for the s2gx "Scala for Java Developers" presentation by Ramnivas Laddad (@ramnivas) are now available here. Keep an eye out on infoq for the full s2gx videos!
  • Finally - Craig Tataryn posted an interesting blog about the Scala "For Comprehension", check it out!

Feel free to drop me a mail or message @cakesolutions or @markglh on twitter!

Topics: scala ide

Posts by Topic

see all

Subscribe to Email Updates