Scala for Netbeans Beta Is Ready, Working with NetBeans 6.5 Beta

>>> Updated Aug 15:

For Windows Vista users: There is a known bug  #135547 that may have been fixed in trunk but not for NetBeans 6.5 Beta, which causes exception of "NullPointerException at org.openide.filesystems.FileUtil.normalizeFileOnWindows" when create Scala project. If you are Vista user and like to have a try on Scala plugins, you may need to download a recent nightly build version of NetBeans. Since I have none Vista environment, I'm not sure about above message.

======

I'm pleased to announce that the first beta of Scala for NetBeans is released, followed NetBeans 6.5 beta releasing. The availability and installation instructions can be found at  http://wiki.netbeans.org/Scala.

Features:

  • Full featured Scala editor
    • syntax and semantic coloring
    • outline navigator
    • code folding
    • mark occurrences
    • go to declaration
    • instant rename
    • indentation
    • formatting
    • pair matching
    • error annotations
    • code completion
  • Project management (build/run/debug project)
  • Debugger
  • Interactive console
  • JUnit integration
  • Maven integration (works with [ http://www.liftweb.net Lift Web Framework)

There are some  known issues. Bug reports are welcome.

Installation on NetBeans 6.5 beta:

button, choose the directory where the Scala plugins are unzipped, select all listed *.nbm files, following the instructions. Restart IDE.

Comments

1. Jesper Nordenberg -- 2008-08-14 09:00

Good work! Some issues I found:

<ul> <li>Debugger breakpoints doesn't seem to work

<li>When single stepping over statements with the local variables view visible it seems that the local variables/values are not updated correctly after initialization, so toString column shows incorrect value and you can't expand the variable to see field values

<li>Code completion doesn't work when there is no dot in the expression, for example "val myVal = 10; my[Ctrl-Space]" doesn't give any completions

<li>Pressing Enter on a blank line unindents one level. Slightly annoying :) </ul>

2. Caoyuan -- 2008-08-14 09:00

Hi Jesper,

Which version of Scala plugins are you using?

Breakpoints should works;

Pressing Enter on a blank line unindents one level.

This should also be resolved sometimes ago.

3. Jesper Nordenberg -- 2008-08-14 09:00

I downloaded the Netbeans beta and 1217968713508_scala-plugin-080805. After I installed the plugin it reports Scala Kit 0.10.0 and Scala Runtime Library 2.7.1.1. There are no other Scala plugins in the installed list even though I installed many more.

4. Caoyuan -- 2008-08-14 09:00

Jesper,

If so, are you using NetBeans 6.5 beta (I should have ask this question).

Thanks

5. Vladimir Kelman -- 2008-08-14 09:00

Great. I installed latest night build of NetBeans and Scala plugin. As a note, there is still some <a href=" http://pro-thoughts.blogspot.com/2008/08/novice-scala-programmer-eclipse-vs.html">small issue</a> with a debugger.

6. Caoyuan -- 2008-08-15 09:00

Vladimir,

I'll go on getting debugger more featured, thanks for the cases

7. lytles -- 2008-08-19 09:00

i installed the plugin and created a new project. it creates the hello world example.

1. can set breakpoints by clicking, but when i try to debug Main.scala from the menu it complains that it doesn't have a main method.

2. mostly i want to try the interactive console, but can't find anywhere how to start it. what menu option starts the console ?

8. caoyuan -- 2008-08-20 09:00

lytles,

In case of complaining for main method, could you send me your code? it seems your code couldn't pass compile.

Interactive console is under menu: windows->other->Interactive Scala Shell, but there is bug which I just fixed, please see "known issues" in this blog

9. lytles -- 2008-08-20 09:00

ok - if i do "run main project" or "debug main project" it works (and stops at the bp). but if i do "run file (Main.scala)" or "debug Main.scala" it complains about the missing main. which is ok, but odd. here's my code: package scalaapplication1 object Main {

def main(args: Array[String]) = {

println("Hello, world!");

}

}

ok, thanks for the pointer to the console (how did i miss that, i even looked under "other" :) looking forward to the next release so i can really try it.

10. Caoyuan -- 2008-08-20 09:00

lytles,

Thanks for your confirmation on the debugger part. I have not got "run file" or "debug file" working yet, although it's not a hard work.

Writing language support or IDE is really a complex work, too many features to be finished, and sometimes I have to wait or modify the underlying modules of NetBeans.

Anyway, we've got a almost working scala IDE now, and I think it will be much better when next release.

11. lytles -- 2008-08-21 09:00

looks good - thanks for the help