I'm starting a new gwt project, and I've decided to use UiBinder instead of pure java. I'm starting to regret this decision. In fact, I'm starting to think that maybe I should switch to pure java. But before that, I thought I post a question and get your feedback.
In my limited experience, UiBinder is all great, until something goes wrong. Then there is no indication of how to solve the problem. All I get from eclipse is "Failed to create an instance of vai deferred binding." Followed by a null pointer stacktrace. Not very useful. And if I want to figure out what's going on, I guess I'll have to figure out where the compiled is stored and scan through that...which defeats the point of having a compiler.
Am I missing a compiler option or something that would generate better error messages?
Thanks in advance.
Related
So ClojureScript One is rather incredible looking! You can make updates with your REPL in real time to a SPA.
So something like this is rather impossible in Java where you don't have a REPL but it seems very possible in something like Groovy or Scala. I'm sort of a Lisp bigot (I really shouldn't be but oh well) and wondering if there is a Scala or Groovy like Clojurescript?
Update:
In theory it looks like one could wrap Scala/Groovy around Java's ItsNat. However I have some doubts about that project given it hasn't been updated since 2011 (also they have they ugliest website.. its like they tried to make it ugly). The license is also rather restrictive.
Try http://www.scala-js.org/ a A Scala to JavaScript compiler
There's js-scala, but it seems to be quite experimental at the moment.
ItsNat has come to quit a stable stage, this is why it is inactive. Of course new features and more browser support and testing can be leveraged, but so far, we've had a great experience with ItsNat. We've been with ItsNat since version 0.7 and had very (2) issues, that too, quite rare ones.
If you'd like working examples, I'd be glad to show you as our project is open sourced :-)
Works well with both SEO and SPI.
Demo
If you are looking for SPA scala-gwt. Or you are looking for scala-to-javascript compiler?
I am working on writing an IDE for Scala and need some help. I would like to implement coding assistance so that I could present a list of options when a user presses a period (".") or a space (" "). e.g. if projects is a List, as soon as user types "projects." or "projects ", I would like to show all methods of scala.List that he could use (regular IDE stuff). I know that scala.tools.nsc.interactive package provides this capability, but I am unable to figure out how to do it. Besides, it seems that the interactive package would use REPL and would be slow for this purpose. Is that a fair assumption, and if yes, are there any alternatives?
Also, is there a way I could get a call reference tree for a literal/ method (where all is the method referred to in a code base) ?
Thanks and Best regards
Aishwarya
Well, your best bet is going through the same set of links I provided in answer to this question, even though the questions are different.
Yes, the presentation compiler under scala.tools.nsc.interactive is where the reusable functionality would be.
The presentation compiler is used by Eclipse and ENSIME. May be ENSIME itself which in addition to providing emacs support also provides a server as a backend for an editor would be a good avenue.
The presentation compiler is not slow. It was designed from the ground up to provide good performance for Eclipse and it has largely delivered on this goal.
For some of the presentation compiler capabilities, see scala.tools.nsc.interactive.CompilerControl.
For another project using ENSIME, look at Daniel Spiewak's plugin for jEdit.
For GWT client side you need Java source code so i got that idea to convert scala code to java code.
How can i archieve this conversion?
Or is there a production ready possibility to use scala directly?
Thanks for any help!
It can't be done because Scala compiles directly to byte code, not Java. Compiling to byte code is much easier than generating Java and besides, there's a lot of stuff the byte code allows that is forbidden by Java the language, such as not declaring checked exceptions.
There's a project going on at http://scalagwt.gogoego.com/ to generate a "java-like" language from Scala that GWT can read. It seems to be moving along nicely and I know Lex Spoon is involved with it. I know they briefly considered the other possibility of decompiling the generated Java but dropped that path quickly after determining that too much information was lost in that process.
If you only want to use Scala on the backend and write the client in Java, that's always been possible and works fairly well in Eclipse.
Some work has been done to allow GWT to be written in Scala, by an intern on the GWT team last summer. See http://www.youtube.com/watch?v=_1GjgFjX5gE
I just came across an error when using NetBeans, and I wanted to post my findings (possible this is old news). Perhaps this will save some people the headache of debugging a similar problem that I just encountered. I don't think I'm abusing anything here... stack overflow's SEO is pretty good :)
I refactored a class in NetBeans (JavaFX project), and from that point on I got a "java.lang.NoClassDefFoundError" for that particular refactored class.
I fixed the error by simply doing a "Clean and Build Project." This apparently deleted whatever cache file or erroneous file/class reference. I don't think this is a Netbeans bug... hoping it was just one of those "flukey" moments.
Cheers!
I have those issues from time to time when I write new code (or create new code). This is because I use the 'build' function instead of 'clean & build'.
Most of the time, the proper set of class is compiled (or recompiled), but there are situations where newly compiled classes are not compatible with already compiled classes. That's when I get java.lang.NoClassDefFoundError. Not a big deal. Just need to clean and recompile everything.
I have recently been asked to make an Eclipse Rcp view that would be "pretty".
In that purpose I had fist looked at Java2D (after my boss advised me so) before the client's query turned to be more like
"It would be smooth if you could do some flash or something ..."
From there JavaFx seemed appealing to me however I never had a chance to use it before. I then were wondering if before to dive "head first" anyone (who would have preferably used it seriously) had any advice, warning or any constructive comment to do about using this product in an RCP view (so based on SWT).
I really long to know if JavaFx meets it's promises.
Thanks in advance and have a good day !
[EDIT]I dont want an Eclipse Fancy skinning or to make views appear with light effects or in a CompizFusion way,
What I want is to display fancy animations and pretty visual effects within a specific view that will be called sometimes. (Sorry I wasn't clear in the first place :s)[/EDIT]
*I'll pass on the "What's pretty and what's not ?" and other "Tastes are a personnal thing" debates, here "pretty" simply means to qualify a view containing convoluted transparancies and subtle animations ...
Eclipse RCP can also be customized in the way it looks, e.g. when you dont want to have the Eclipsi-L&F. Its called Presentation API, I saw a quite amazing UI once in a presentation but I cannot find it right now. Anyway, I just want to point you the direction, since I personally havent used this API (yet).
There are also some "skins" available for download.
Nebula
MP3 Manager
EDIT: Just found the slides. It goes quite into detail, but when you have a look at the last slide...it doesnt look like the Eclipse you know :-)
JavaFX uses Swing as default layout engine, so you'll gain nothing using it rather than Java2D.
On the other hand, using either your home-grown toolkit or Swing is generally a bad idea when working with Eclipse, as it already embeds the SWT toolkit. The main advantage of SWT over Swing is that it use the OS native widgets. Using another toolkit will lead to the following issues:
Poor integration with Eclipse look&feel.
Poor integration with Eclipse views and editors management.
The answer is simple. No, you can't use JavaFX yet. The problem is that JFX script can't be embedded into Swing nor Eclipse SWT. We already know about such an issues. (The is some kind of hack how to embed JFX into Swing APP only.)