- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Eclipse plugin for mixed Java/Scala
Sun, 2009-07-12, 07:11
One of my teammates was evaluating the suitability of Scala for our
team, including Eclipse IDE support. He reported the following:
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
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.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?
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() );
}
================
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
Sun, 2009-07-12, 16:17
#2
Re: Eclipse plugin for mixed Java/Scala
On Sun, Jul 12, 2009 at 3:13 PM, David Chase wrote:
> I would NOT use 2.8.anything, and I had some bad luck with development
> versions of Eclipse 3.5.
> (Reporting bugs against Eclipse is not a productive way to spend your time.)
Unless you want to help with development then, yes, avoid 2.8.0 of the
IDE for the moment. OTOH, I'd strongly encourage people working from
the command line to kick 2.8.0's tyres ... the more feedback we get
the better.
On Eclipse 3.4.2 vs. 3.5 ... both will work well once the Scala IDE is
installed. However, an install into 3.5 is more likely to go smoothly
if you have a setup with deviates significantly from completely
vanilla (ie. read-only installations or non-standard filesystem
layouts). So on balance I would recommend 3.5 over 3.4.2 unless you
have a pressing reason for sticking with the older release.
Cheers,
Miles
Sun, 2009-07-12, 16:27
#3
Re: Eclipse plugin for mixed Java/Scala
You may want to update the docs:
http://www.scala-lang.org/node/94
Which say (among other things) that the recommended version of Eclipse for the Scala plugin is 3.4.1, and that 3.5 Milestone releases are not fully supported.
Sam Reid
Miles Sabin wrote:
http://www.scala-lang.org/node/94
Which say (among other things) that the recommended version of Eclipse for the Scala plugin is 3.4.1, and that 3.5 Milestone releases are not fully supported.
Sam Reid
Miles Sabin wrote:
30961e500907120811v6f35e6ddh17e6c9ac32fd28e7 [at] mail [dot] gmail [dot] com" type="cite">On Sun, Jul 12, 2009 at 3:13 PM, David Chasewrote: I would NOT use 2.8.anything, and I had some bad luck with development versions of Eclipse 3.5. (Reporting bugs against Eclipse is not a productive way to spend your time.)Unless you want to help with development then, yes, avoid 2.8.0 of the IDE for the moment. OTOH, I'd strongly encourage people working from the command line to kick 2.8.0's tyres ... the more feedback we get the better. On Eclipse 3.4.2 vs. 3.5 ... both will work well once the Scala IDE is installed. However, an install into 3.5 is more likely to go smoothly if you have a setup with deviates significantly from completely vanilla (ie. read-only installations or non-standard filesystem layouts). So on balance I would recommend 3.5 over 3.4.2 unless you have a pressing reason for sticking with the older release. Cheers, Miles
I'm a Java programmer, working with a large mixed Java/Scala project,
using Eclipse.
I don't do enough work in Scala to evaluate the plugin there, but that
will change.
The Java functionality, including all your bullet points, is fine. I
am pretty sure
that other programmers on the team (at a different site, they may
chime in) use Eclipse
with Scala. Most of us use Macs.
Issues, such as they are:
- you'll need to increase your heap and stack sizes
- versions are an issue. What I use today:
Eclipse 3.4.2, Scala 2.7.5final
- compiler and plugin versions must match, assuming you do builds in
and out of Eclipse.
We've got a multi-step ant build, so I rarely rebuild from scratch
inside Eclipse.
This is also driven by ant boneheadedness, not Scala.
I would NOT use 2.8.anything, and I had some bad luck with development
versions of Eclipse 3.5.
(Reporting bugs against Eclipse is not a productive way to spend your
time.)
David
On 2009-07-12, at 2:11 AM, 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