MonthJanuary 2010

OpenSAGA

OpenSAGA Logo

As you may have noticed, I often have very long phases where I don’t really blog about anything tech. This is most often caused by me not really having to write anything about that is not too connected to my day job. While the technical contents of this blog connect to a lot of topics at my day job, I usually avoid writing about stuff directed related to my work, partly because of business discretion, partly because of this being my private blog.

Now it occurs that my current project is about to become a whole less secret, that is, it is going to be GPLed. The first official release will be on May, the 1st 2010 (we might do preview releases).

There already is a pretty rudimentary OpenSAGA website, but the English speaking audience has to wait a little until we have a first technological overview in English.

The fight with Eclipse

Somehow I seem doomed to be in a constant love/hate relationship with my IDE of choice. Nowadays that’s Eclipse. On one hand, I don’t want to do any Java development without the refactoring tools and source helpers that Eclipse provides, on the other hand I find myself in a constant battle with Eclipse bugs — and they’re not of the sporadic kind, the kind every software product has, but of the soul-crushing, repetitive and long-lasting kind. Whenever there’s a new Eclipse version, I secretly hope this one will remove some of them, but usually they just get more. Sometimes bugs disappear, usually when some component is completely rewritten, but it’s very rare.

Sometimes I am lucky though and discover a way around them by either being persistent enough or by finding just the right magic combination of search terms that point me to a solution. To end this blog post somewhat uplifting, here are two fixes I found recently.

The Workbench-locks-up-at-startup Bug

This one happens fairly often for me. On startup, eclipse will do nothing or just write something like “Initialize Java tooling.. 1%” and then just stop working. Since I use Ubuntu with Compiz, that will then turn desaturate the eclipse window to signal the app is no longer responding to any window messages. There seems to be no CPU activity and this all continues until I forcefully kill the eclipse process.

Solution (found on Stackoverflow)

Delete either  .metadata\.plugins\org.eclipse.core.resources.projects\.markers.snap or .metadata\.plugins\org.eclipse.core.resources.projects\.snap (or both?)

Bug: “Link with Editor” does not work with Javascript files anymore

The Eclipse team keeps changing the javascript editor, usually for the worse. Where it once was a simple syntax-highlighting editor that was of no big help, but did not stand in your way, either, it now tries to help you writing Javascript without seeming to actually understand Javascript at times. For example, it complains when you write “var undefined;” which is perfectly valid JavaScript and useful, too. (“undefined” is not a keyword like “true” or “false” but just a special value. Every variable that gets declared but has no value internally has that special undefined value. Redefining undefined locally makes access to it faster because it is already found in the local scope and also enables Javascript compressing tools to shorten the variable name.

Eclipse also acts weird when you try to type stuff like

$(function() {

});

or

(function() {

})();

Eclipse reorders round and curly braces etc.

So my strategy with the new JavaScript editor was basically to switch off what I could and ignore or suffer through the rest. Until the “Link With Editor” Bug came up. I really like “Link with Editor”, because it lets me collapse my whole project tree and then open up those branches I’m actually working on currently — but suddenly, it no longer worked with .js Files (WTF!?)

Turns out Eclipse is again trying to be clever and now forces you to set up all your script folders to have your scripts then listed under “JavaScript Elements”, something I couldn’t manage to with my current project.And if you fail to do so, Eclipse punishes you by taking away “Link with Editor” from you.

Solution (found that one myself)

Either use the “package explorer” of the Java perspective, not the “project explorer” or in the project explorer, click on the small triangle that opens the “View Menu” and select “Customize View…”; and then on the second tab, disable “JavaScript Elements”. Now Eclipse will honor “Link with Editor” with .js files again.

edit: correct .snap path

© 2014 fforw.de

Theme by Anders NorenUp ↑