Scala for NetBeans Screenshot#12: Better Completion with More Types Inferred
>>> Updated May 11
Mostly, infix expressions can be type inferred now. CTRL+Click on infix op name, it will bring you to declaration (since 1.0.29.0)
===
Well, the type inference work is not so easy (with performance in mind), but anyway, I've got a bit more progress, at least, the chained member call can now be correctly inferred in a lot of cases. It's some level as Tor's JavaScript for NetBeans now.
First, let's create a val "node", which is a "scala.xml.Node"
Then, input '.' to invoke completion, as I know which type is of "node", the proposal items look good.
I choose "descendant" function (which returns a "List"), and input '.' again, we can see the proposal items look still good.
These features also work on Java's class.
Known issues:
- It seems the indexing/scanning for Scala standard library source will perform twice when you first installed Scala plugins
- The type inference is not consistence yet, so don't be strange for the strange behavior sometimes
Again, don't forget to download scala standard library's source jars and unzip to $SCALA_HOME/src, per sub-folder per jar
Posted at 10:45AM May 09, 2008 by dcaoyuan in NetBeans | Comments[6]



just wanted to thank you for your hard work! sun should hire you!
Posted by pk11 on May 09, 2008 at 03:06 PM PDT #
The progress in the last month was impressive, thank you so much!
Posted by Landei on May 11, 2008 at 11:20 AM PDT #
+1 on the impressive work.
I'm still unable to get the Scala interactive window to start - always get the array index out of bounds error.
Any tips?
Posted by 99.201.162.53 on May 12, 2008 at 03:21 PM PDT #
... just saw your note on a prior blog post.... I'll try the latest nightly build and see if the Scala Interactive Windows works - will post stack trace if it doesn't work on Vista.
Posted by 99.201.162.53 on May 12, 2008 at 04:16 PM PDT #
Interactive Scala window on Vista with NetBeans IDE Dev 200805121203 and JDK1.6.0_06 upon attempting to open Interactive Scala window:
java.lang.ArrayIndexOutOfBoundsException: 0
at java.lang.ProcessBuilder.start(ProcessBuilder.java:443)
at org.netbeans.modules.languages.execution.ExecutionService$2.run(ExecutionService.java:362)
[catch] at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
Posted by 99.201.162.53 on May 12, 2008 at 09:53 PM PDT #
thank you for your great work
Im using ur plugin and at this point you're making a tool that the whole community will be using to get things off the ground.
your focus is refreshing and appreciated.
thank you
Posted by ivan_nyc on May 14, 2008 at 02:41 PM PDT #