I want to leverage the Scala's Actor Framework while I develop the user interface in the familiar Swing way.
Is it possible to have a mixed Java - Scala project in Eclipse, NetBeans or any other IDE?
I want to leverage the Scala's Actor Framework while I develop the user interface in the familiar Swing way.
Is it possible to have a mixed Java - Scala project in Eclipse, NetBeans or any other IDE?
Have you tried Scala's Swing wrapper? It's very lightweight in the sense that you've always access to the underlying Swing classes but it's very well thought out. I've found it pleasant to work with - the reactions pattern makes event handling so much easier and the actor framework makes event propagation so much clearer than using PropertyChangeSupport
It's perfectly possible to use it with your own custom Swing widgets too.
The "official" Scala plugin for Eclipse allows you to add the "scala nature" to any project, alongside the java nature. This allows you to mix and match however you'd wish.
I was playing with scala for the first time last night, using the Eclipse IDE, and it works very well.
Also, I just ran across this article: http://www.codecommit.com/blog/scala/joint-compilation-of-scala-and-java-sources
Seems that scalac knows enough about java to be able to resolve dependencies on java source, without actually compiling them. Very smart.
Intellij does a good job of supporting mixed Java / Scala projects. At the moment the Scala support in Intellij seems better to me than the Scala IDE for Eclipse. (I have been a long time Eclipse user, recently trying Intellij on the recommendation of some other Scala coders).
The Scala plugins for NetBeans are doing well too. With Swing development made so easy with NetBeans, it might just be what you are looking for :)
I've successfully mixed Java and Scala in my app. It runs in the Goggle App Engine and I use Spring MVC for the UI. (will port to Lift later)
The plugins for Intellij are a great help. Though it is still early days and there are occasional problems. (for instance the Scala plugin compiler does not seem to like JDO enhanced Java classes too much...there is a work around and I am sure this bug will be fixed soon).
The only thing I find a bit tedious about the mix is dealing with Java APIs that return Java collection class in Scala. Its very clunky and you have to jump through hoops a bit.