Scala plugin and Rational Developer for System z with Java not working - eclipse

Hi all you clever people.
I'm a Scala enthusiast which fully believe in Scala as a tool which will raise productivity, compared to Java in many areas. I have been a happy user of the eclipse scala plugin for some time. However now the time has come for me to introduce it for my colleagues, and to my big disappointment the Scala plugin doesn't seem to work with Rational Developer for System z with Java.
This is a big issue for me, since I wouldn't like to force my colleagues to have another eclipse installation just for the Scala plugin, and when building.
The problems I get seems to be related to the java launcher, and also the aspectj weaving.
Is there somebody there know if this is a known issue, or what I else should do.
If nobody knows about this issue, I guess the next place to go, is to place a bug description on the Scala plugin, however I don't know the fix time for these kind of issues.
Many thanks in advance.
Regards Stefan

You're probably right in your analysis that it's something to do with the aspectj weaving. Does the Rational plugin use aspects at all? If so, that may be the problem. In the past there have been a number of problems due to the scala-ide use of aspects. There has been a lot of work done, and the latest versions (as of 15.03.2012) are a lot better.
Two things to try:
Try the latest version of the scala-ide plugin.
If the above doesn't work, raise a bug (http://www.assembla.com/spaces/scala-ide/tickets) but mention specifically that you're using Rational developer, and if you can identify the rational plugin that's using aspects, even better. Please attach a url which points to the version of the rational plugin that you're using.

Related

Scala # IntelliJ 12 - Can't fetch docs / some functions are not shown in dropdown. [BUGS]

I've been searching for a long time now to find a decent IDE for Scala.
Eclipse is not satisfying at all, as auto completion doesn't work, somehow. Also, I can't modify the libraries at all in the build path e.g. set the docs/source.
IntelliJ seems better, however, there are some major bugs:
When the drop down menu appears that lists all the function, some of them are sometimes just not shown! I think it's because of scala-library / scala-compiler, it mixes them up or something...
The docs cannot be fetched, I get this message over and over again (here the functions are listed, strange enough...):
This is the library window:
The dependencies and the compiler are set right, I strongly suppose.
Does anyone know what the problem is? And how to fix it? Or is it a known bug?
Is there an IDE that can handle Scala?
Regards!
Typically, searching for names (values/classes/functions/etc.) for auto-complete can be quite slow compared to Java in IntelliJ simply because the automatically imported namespace can be quite large, and it also searches through all implicit conversions. However, I've never seen it refuse to show functions like your screenshot, what version of IntelliJ and Scala plugin are you using?
I've never gotten the pop-up docs to work via attaching JavaDocs (I haven't tried remote fetching), so I'd recommend just ctrl+click to go through to the source to read the documentation there. (However, the function/type definition does popup correctly when sources are attached). I'd suggest posting an issue at http://youtrack.jetbrains.com/issues/SCL if you have the opportunity.
To your final question, the answer is unfortunately no. The tooling for Scala is nowhere near that of Java, but both Scala IDE for Eclipse and IntelliJ are making great progress in changing that, and both are strong in some areas while weak in others. In the end, you'll get limited support either way, so choose whichever fits you best.
I have found the solution to the problem:
The bug was caused by Java Decompiler Plugin. It tried to decompile the binaries of Scala's class-files, which obviously failed. This led to that error message and further led to the Scala plugin not working as it should, thus not displaying some of the functions.
This took me a long time to figure out, I installed 2 other versions of IntelliJ (which apparently imported the JD plugin), NetBeans and downloaded several builds of the Scala Plugin, only to discover this cause. Deactivating Java Decompiler solved it.
Regards.

Is the scala eclipse IDE stable enough?

I use eclipse as my scala IDE. But It seems not so good. I can build my project using maven successfully. But eclipse always warn me there's compilation error. Any has experience of scala eclipse plugin ? Thanks BTW I use scala IDE for 2.8.1
There is a new Eclipse plug-in which is in the final stages of release, currently in beta 4 which offers numerous improvements including stability. It runs with Scala 2.9.
You can download and try it for yourself. More information and download available here:
http://www.scala-ide.org/
Also, be sure to read on improving Eclipse performance, I find a few of these tweaks makes a big difference. Here are some answers on Stackoverflow regarding that:
How can you speed up Eclipse?
What are the best JVM settings for Eclipse?
I've been using all three major IDEs over the last few days for Scala.
Eclipse is pretty good and perfectly useable although you will encounter a few bugs - silly things like you can't load compiler plugins if you have a space in your plugin folder pathname. It also behaved pretty badly a few times and wouldn't run anything until I restarted Eclipse, but this might be partly because I'm new to it and maybe have been doing something wrong. One thing that is good about Eclipse is that the build time is a lot quicker than for the other two - I think this is because it does and "incremental build". Or maybe it's just more optimized, but it's noticeable.
I would recommend trying the latest version of IntelliJ (10.5). It seems to be the best at the moment with the fewest rough edges, and the only one to have Scaladoc support integrated. I haven't used it much but first impressions are good.
The NetBeans plugin seems to be getting left behind a bit (there's only one guy working on it), which is a shame because it has IMO easily the best code editor for Java, with excellent predictive capabilities which you don't get for Scala at the moment. I'll continue to use it for Java, but the Scala plugin development is a bit sparse. (Although it might be because I'm using a beta version, because that's all that's available right now for Scala 2.9.)

Is it a good idea to develop an IDE for scala?

I have to choose a sizable (but not too sizable!) project for my next & last term in university. I thought maybe a nice IDE for scala is what the world might need right now :).
Would you like to see an IDE specifically made for scala? Or are you more comfortable using (the already available) plugins for popular (mainly java) IDEs & editors?
What do you think about the whole idea?
P.s. I'd make it open source & would add features one by one, so if it doesn't end in one semester, it won't be a problem from the university perspective.
Actually, not anymore. IntelliJ, Netbeans and Eclipse all have Scala-specific efforts that have more man-hours in it than you could possible start to begin putting in at a last term. And there's two very interesting efforts that were results of projects like that, both of which were made to contribute to any IDE effort: ENSIME and Scala Refactoring.
And, beyond these efforts, most programming editors, such as jEdit or TextMate, also have some Scala support to one degree or another.
So, really, contributing to one of these projects might be a good idea, but making a Scala IDE is not.
For his Masters thesis, Mirko Stocker contributed the refactoring functionality to the Eclipse Scala plugin, see:
http://misto.ch/scala-refactoring-talk-at-scala-days-2010/
Instead of creating an IDE from scratch, why not contribute a major piece of functionality to the Eclipse plugin, all contributions are welcome. For ideas, see tickets.
Or instead of reinventing the wheel.. you can contribute..
http://wiki.netbeans.org/Scala
But I am not sure if it will be somehow enough for your university work. At the same time, as you see, those plug-ins still require a lot of work.
While writing your own IDE you will just trying to solve problems that were already solved and tested. Besides, even if - what kind of IDE is that, which allows you to do
Scala (even if its great) only. So just for simple xml edit of ant file or whatever you will need another tool.
I think Brian Clapper already summed it up nicely.
I'd suggest something like CheckStyle but for Scala might go down well and be reasonable to tackle as a project.
Not a Scala developer but an Eclipse plug-in would probably be a worthy senior project.
Concur. Operating systems, text editors, and IDEs...does the world really need more of them? No. But everyone wants to write one.
If you want to do something useful, as opposed to simply academic, develop an extension for an existing IDE. Eclipse, NetBeans, Komodo, etc. are all nicely extensible through plugins.

Another Java vs. Scala perspective - is this typical?

I have been reading about Scala for a while and even wrote some small programs to better understand some of the more exoteric features.
Today I decided to do my first "real project", translating some 60 lines of ugly Java code to Scala to rewrite it using the better pattern-matching features (why? because the Java version was becoming hard to maintain due to excessive combination of regex and conditionals).
About halfway through the editing process, Eclipse thew up this error:
alt text http://img269.imageshack.us/img269/1243/errorms.jpg
I get the general impression that the Scala IDE in Eclipse is a lot buggier and less complete than its Java equivalent. Is this correct or do I just have a bad installation? Is there a better IDE for Scala?
I really like IntelliJ Idea Community Edition's Scala support. I've been using it from it's early days. I've also tested Netbeans and Eclipse plugins but I really don't like them that much. Especially all Eclipse Scala plugins are crap. I also tested Textmate Scala bundle, which is very nice but doesn't offer auto completion.
Here is my Scala Ide top list:
IntelliJ Idea Community Edition
Netbeans
Textmate (This is here, since I really like Textmate for writing Rails applications)
Eclipse
When you learn IntelliJ Idea keyboard shortcuts and add some live templates you can be very productive programmer. Furthermore, if you buy the Intellij Idea Ultimate Edition you can even share the settings with multiple computers or with your team.
What I suggest:
Download IntelliJ Idea Community Edition
Install the Scala plugin
Learn the keyboard shortcuts: Windows and Linux, Mac
Configure Live Templates when you get more familiar with the ide
The Eclipse IDE Scala support has not been great for some time, but is now receiving additional development effort alongside the introduction of Scala 2.8, and appears to be improving. For Scala 2.7 I have found the Intellij plugin to be in a better state.
One problem that both of these plugins have is that Scala itself is a moving target - Scala 2.8 has introduced additional syntax and structures to Scala 2.7.
From my own experience with Eclipse, using it for languages other than Java is never quite as good.
You might find this post of interest.
I get the general impression an IDE for a new, young, niche language is a lot buggier and less complete than a widespread, supported, mature language
Try Netbeans. Its plugins are generally of a simpler construction anyway, so should have less 'gotchas'
One point to make is that it is possible that people are still put off IntelliJ because they assume that the licence is expensive, especially if they are happy with Eclipse and are unaware of the Community Edition which is free and open source.
I cannot give any comparison with the other IDEs as I have always used IntelliJ, however the Scala support is certainly good, all things considered, and getting better.
We are using Eclipse Scala plugin at work and working with it is quite terrible. One cannot really trust reported errors inside IDE, runtime exceptions are the order of the day. Our best experience is with build from 25-11-2009.
At home I play with IntelliJ 9 and its Scala plugin and I find it much much better. I am newbie to IntelliJ but I am very impressed with all those little details which (once you get used to them) increase your productivity... a lot.
The drawback is in IntelliJ there is no compile-error reporting on the fly (at the time you're writing code) yet implemented and only Scala up to 2.7 is supported (2.8 by nightly builds only), but there are NO runtime exceptions while working with the IDE. I would recommend you to try IntelliJ, community edition at least.
I never really get on with IDEs at the best of times because they are usually pretty awful at actual text editing, but Eclipse's Scala plugin is particularly brittle to the point that projects "forget" that they are Scala after a while. Battling Eclipse seems to consume more effort than it saves. I just went back to my Emacs and sbt REPL in a terminal.
A light play with IntelliJ confirmed that it does at least do the job as a Scala IDE, but again I didn't care for its editor. It's also commercial software. However, if you are seeking a robust Scala IDE, this is perhaps where you should be looking.
What I have since settled on is perhaps perverse and not for the newcomer, but suits somebody who has definite opinions about their text editor. ENSIME is an editor plugin and server component that adds what you need from a Scala IDE to Emacs. It also claims support for vim, Atom, and Sublime, but I've not tested these. Occasionally it also has a bad day—obscure kinds of macros particularly confuddle it—but it generally does the job.

Which one is better (in support, difficulty, ...) to develop a plugin, Netbeans or Eclipse?

I would like to make a new plugin for a programming language because there is not any IDE the time I asked this question. I think IDE developing is far more easier if I try to use one of the available platform like Netbeans or Eclipse or ...
As I checked, Eclipse plugin (if that plugin is not updated) won't be able to start up after 1 or 2 years. I mean, Eclipse develops a way that old plugins has to follow in order to hold the compatibility.
I can't answer your original question as I have not developed for Netbeans.
As the backwards compatibility, if the version dependencies are set right, and only the API from other plug-ins are used, the old plug-in should work (there are some exceptions, but in that case upgrading the plug-in does not take too much effort, as there is documentation about what has changed).
The main drawback in Eclipse development is that documentation is sometimes scarce, but for common tasks there is some available.
Sorry, I also can answer only 1/2 of your question.
I have developed (small) eclipse plugins and an eclipse RCP. Both were a breeze. I agree with #Zoltan's comment, get your dependencies right & don't use some back-door unsupported feature in aplugin you don't control & your problems should be minimal. Even if you did run into a dependency problem, the configuration is straightforward enough that you could make an updated release of your plugin very quickly.