- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
State of Eclipse plug-in
Mon, 2010-01-25, 23:43
Hi
After having read a lot of interesting stuff about Scala, I wanted to
give it a try myself.
So I downloaded the Eclipse plugin and started exploring.
However as soon as I started typing, I noticed that the comfort when
editing is far away from what we are used to from the Java environment:
- If I select my Scala project and execute "New" from the context menu,
I can directly create a Java class, but the has to be searched in "Scala
Class" in "Other... / Scala Wizards"
- There is no automatic indentation when typing: If I type "class {" in
Java and hit return, the new line is automatically indented and if I
type "{", the line is unindented. In Scala, automatica indenation works
from time to time and unindendation never
- The source code formatter does not work: If disarranged the
indentation of Java code, I call Source / Format to clean up the mess.
In my Scala installation, the Source / Format command has no effect.
- My default indentation for Java is set to a tabulator shown as three
spaces. Scala obviously uses only two spaces - how can this be changed?
- I then tried Preferences / Scala / Scala Editor Preferences, but the
dialog had a strange look and feel, i.e. the elements were not aligned
and partly hidden - it looked like a prototype.
- Often when I try to use content assist, it just beeps and cannot help.
After some trying around, I figured out for example that content assist
on "arg" does not work in "for (val arg <- args)", but only in "for (val
arg: String <- args)".
- Content assist does never pop-up automatically, but must always be
activated.
So I'm asking myself whether my installation is broken or it this the
current state of the art?
Is the usability of the Netbeans plugin better or what is the proposed
IDE for Scala development?
I'am using the Scala plugin 2.7.7.final, Eclipse 3.5 and JDK 1.6u18.
Regards,
Thomas
Tue, 2010-01-26, 00:17
#2
Re: State of Eclipse plug-in
i found at least in this time where the stability of the eclipse plug-in greatly fluctuates that the netbeans plug-in works very well. however i'm using it with scala 2.8, so i don't know about 2.7. netbeans has two disadvantages:
- no incremental compilation (in medium sized projects the compiler is messed up and produces wrong errors instantly when editing a single file, so before you run your project, you must always to a clean-compile which costs a lot of time)
- there is no automatic nightly plug-in updates, the latest binary is behind scala 2.8 RC8, and compiling the plug-in yourself is not recommended (i gave up with this)
- otherwise, it is reasonably fast and works nice. tab size is configurable, and at least it tries to do some automatic indentation (mostly ok, sometimes wrong / ugly though), and you can easily shift the code blocks left / right.
- you have a good structure browser, and although updates are rather slow, they usually come after a while and actualize the color formatting of the source code. imports are sometimes not properly seen and hence code completion works only half. (hint: open the source file of the import, then go back to the file which imports that, the plug-in seems to get the import now)
i still do my java projects in eclipse because it is superior in my opinion, but for scala i prefer netbeans now. also netbeans 6.8 looks much better than eclipse with their rather ugly SWT implementation on OS X. thumbs up for netbeans (and please, caoyuan, post a binary for the latest RC)
ciao, -sciss-
Am 25.01.2010 um 21:45 schrieb Thomas Mauch:
> Is the usability of the Netbeans plugin better or what is the proposed IDE for Scala development?
Fri, 2010-01-29, 08:07
#3
Re: State of Eclipse plug-in
On 26/01/10 06:57, Miles Sabin wrote:
> I strongly recommend you work with the nightly builds of the Scala
> IDE.
I have toyed with Scala IDE for Eclipse (recent nightly 2.8). There
appears to be no refactoring at all. Should I be able to rename an
identifier and have the IDE change other occurrences? Refactoring
support seems quite limited compared to Java.
If renaming is not currently supported, is it planned for 2.8 final?
Kind regards,
Fri, 2010-01-29, 08:37
#4
Re: State of Eclipse plug-in
On Tue, Jan 26, 2010 at 6:57 AM, Sciss wrote:
> i found at least in this time where the stability of the eclipse plug-in greatly fluctuates that the netbeans plug-in works very well. however i'm using it with scala 2.8, so i don't know about 2.7. netbeans has two disadvantages:
>
> - no incremental compilation (in medium sized projects the compiler is messed up and produces wrong errors instantly when editing a single file, so before you run your project, you must always to a clean-compile which costs a lot of time)
> - there is no automatic nightly plug-in updates, the latest binary is behind scala 2.8 RC8, and compiling the plug-in yourself is not recommended (i gave up with this)
Use Maven based project instead of Ant, see my comment on previous thread.
You do not need to worry about the Scala runtime versions, the bundled
scala libs are used by NetBeans' plugin itself only, all building
process is using the $SCALA_HOME one for Ant based project, or, the
one that the Maven pom.xml assigned. Indeed, if there is no big broken
of the Scala compiler API, this plugin should work for any Scala-2.8.x
:-)
>
> - otherwise, it is reasonably fast and works nice. tab size is configurable, and at least it tries to do some automatic indentation (mostly ok, sometimes wrong / ugly though), and you can easily shift the code blocks left / right.
Which one you seems wrong/ugly? Please give me some example code, I'll
try to fine-tune them.
>
> - you have a good structure browser, and although updates are rather slow, they usually come after a while and actualize the color formatting of the source code. imports are sometimes not properly seen and hence code completion works only half. (hint: open the source file of the import, then go back to the file which imports that, the plug-in seems to get the import now)
>
> i still do my java projects in eclipse because it is superior in my opinion, but for scala i prefer netbeans now. also netbeans 6.8 looks much better than eclipse with their rather ugly SWT implementation on OS X. thumbs up for netbeans (and please, caoyuan, post a binary for the latest RC)
>
> ciao, -sciss-
>
>
>
> Am 25.01.2010 um 21:45 schrieb Thomas Mauch:
>
>> Is the usability of the Netbeans plugin better or what is the proposed IDE for Scala development?
>
>
Fri, 2010-01-29, 09:37
#5
Re: Re: State of Eclipse plug-in
On Friday 29 January 2010 07:58:29 Ben Caradoc-Davies wrote:
> I have toyed with Scala IDE for Eclipse (recent nightly 2.8). There
> appears to be no refactoring at all. Should I be able to rename an
> identifier and have the IDE change other occurrences?
Nope, you can't. But I'm in working on it as part of my Scala Refactoring
project (take a look at my blog for more information:
http://misto.ch/tag/scala/), and not just rename, but also extract method,
etc.
> If renaming is not currently supported, is it planned for 2.8 final?
That highly depends on when 2.8 final will be released, but it's definitely not
planned at the moment.
Regards
Mirko
Fri, 2010-01-29, 10:57
#6
Re: Re: State of Eclipse plug-in
On Fri, Jan 29, 2010 at 8:31 AM, Mirko Stocker wrote:
> On Friday 29 January 2010 07:58:29 Ben Caradoc-Davies wrote:
>> If renaming is not currently supported, is it planned for 2.8 final?
>
> That highly depends on when 2.8 final will be released, but it's definitely not
> planned at the moment.
I'm very much hoping that your framework will be far enough along that
a rename refactoring will be doable in time for 2.8 final. Do you
think that's possible?
Cheers,
Miles
Fri, 2010-01-29, 11:57
#7
Re: Re: State of Eclipse plug-in
On Friday 29 January 2010 10:47:09 Miles Sabin wrote:
> > That highly depends on when 2.8 final will be released, but it's
> > definitely not planned at the moment.
>
> I'm very much hoping that your framework will be far enough along that
> a rename refactoring will be doable in time for 2.8 final. Do you
> think that's possible?
Oh it's certainly possible (is there something like a feature-freeze date?),
but its not planned in the sense that we can promise it. I just don't want to
disappoint people..
Regards
Mirko
Thu, 2010-02-25, 18:27
#8
RE: State of Eclipse plug-in
Thanks Miles for your advice.
I'm starting a Scala project (with some GUI involved) and was wondering
which version to use: 2.7.7 vs 2.8.0 Beta.
Unfortunately, I could not compile my project when switching to 2.8.0.
(see a previous unanswered mail on "debugging compiler crash").
Moreover, all syntax highlighting was gone.
So I went back to 2.7.7 for the moment. Do you know by when we should
have a more stable release?
Best regards, and thanks for the work done,
Gilles.
-----Original Message-----
From: Miles Sabin [mailto:miles@milessabin.com]
Sent: lundi 25 janvier 2010 23:57
To: Thomas Mauch
Cc: scala-tools@listes.epfl.ch
Subject: Re: [scala-tools] State of Eclipse plug-in
On Mon, Jan 25, 2010 at 9:45 PM, Thomas Mauch
wrote:
> So I'm asking myself whether my installation is broken or it this the
> current state of the art?
The wizard issue is solved by switching to the Scala perspective. Tab
settings are controlled by the Java formatter. The remainder are known
limitations many of which are fixed or in the process of being fixed
on trunk in the run up to 2.8: unless you have a requirement for 2.7.x
I strongly recommend you work with the nightly builds of the Scala
IDE.
Cheers,
Miles
Thu, 2010-02-25, 19:47
#9
Re: State of Eclipse plug-in
On Thu, Feb 25, 2010 at 5:18 PM, Gilles SCOUVART
wrote:
> Thanks Miles for your advice.
> I'm starting a Scala project (with some GUI involved) and was wondering
> which version to use: 2.7.7 vs 2.8.0 Beta.
> Unfortunately, I could not compile my project when switching to 2.8.0.
> (see a previous unanswered mail on "debugging compiler crash").
I'd missed that earlier, but as far as I can tell you're referring to
a presentation compiler crash in 2.7.x? Either way, I strongly advise
against mixing 2.7.x code with the 2.8 IDE.
> Moreover, all syntax highlighting was gone.
In 2.8 hightlighting is consistent with the JDTs highlighting of Java.
Also semantic highlighting (which was present in a fairly unreliable
form in 2.7 and earlier) is still TBD. What are you seeing?
> So I went back to 2.7.7 for the moment. Do you know by when we should
> have a more stable release?
2.8 is the way to go if you aren't constrained by the need to be
compatible with 2.7.7 binaries. Either use the 2.8 beta preview of the
IDE or the go with the nightly builds.
Cheers,
Miles
On Mon, Jan 25, 2010 at 9:45 PM, Thomas Mauch wrote:
> So I'm asking myself whether my installation is broken or it this the
> current state of the art?
The wizard issue is solved by switching to the Scala perspective. Tab
settings are controlled by the Java formatter. The remainder are known
limitations many of which are fixed or in the process of being fixed
on trunk in the run up to 2.8: unless you have a requirement for 2.7.x
I strongly recommend you work with the nightly builds of the Scala
IDE.
Cheers,
Miles