- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Re: Eclipse plugin for mixed Java/Scala
Sun, 2009-07-12, 07:20
It is a known non-problem. :) Many people use it with mixed projects. In fact I think mixed projects is th eclipse plugin's advantage over the other IDEs.
It cannot yet do move or rename, though.
If you have a specific problem setting it up, ask on this list. And if there's a step missing or unclear in the wiki, please fix it.
-------------------------------------
Samuel Robert Reid wrote:
One of my teammates was evaluating the suitability of Scala for our team, including Eclipse IDE support. He reported the following:
I spent ~3 hours testing the Scala Eclipse plugin with a very trivial program, consisting of 2 files that I've reproduced below. The purpose of this program is to print "hello world" to the console.
Before I started testing, I made a list of essential things that I need to be able to do in Eclipse, including:
- run
- tell me when there are compile errors
- rename
- move
- suggest completions
- format code
- go to definition
For mixed Scala-Java code, the Scala Eclipse plugin failed in every one of these cases. And it repeatedly got so confused that I had to delete and recreate my project. Needless to say, this is not a usable development tool. It's laughable to think that this could scale to something like our project. So I've stopped my evaluation, and I recommend that we revisit in 6-12 months.
===============
/* MyJava.java */
package com.pixelzoom.scalatest;
public class MyJava {
public static String getString() {
return "hello world";
}
}
/* MyScala.scala */
package com.pixelzoom.scalatest;
object MyScala extends Application {
println( "MyScala says: " + MyJava.getString() );
}
================
Is lack of support for mixed Java/Scala applications a known problem for the Eclipse IDE? What is the likelihood that there was a configurational problem? I don't know all the details of the configuration, but he was following instructions here for plugin installation: http://www.scala-lang.org/node/94 and was running on a Mac. If there was indeed a configurational problem, what fraction of the checklist tests above should have passed, and which are known to be unsupported presently?
We don't have much (any?) more time budgeted to help identify and resolve configurational problems for Scala evaluation, but I'd be interested to hear if others have had this problem, if it's related to the client configuration or the state of the plugin, and what is the roadmap for features above that are currently unsupported. (This relates to the Eclipse Plugin Project Plan thread that was started earlier today, which also requested a roadmap for high priority upcoming features.)
Thanks for your help,
Sam Reid