Author Archives: laknath

XQuery plugin – Journey continues…

Last few weeks had been good for the new plugin. Nothing too fnacy yet, but now I think it has a firm basic structure and other necessary classes to name it as an “Eclispe SSE based editor”.

Regarding how it’s processing is done (since that’s what really matters), we have thought of following a somewhat same structure as in HTML+CSS plugins. This is due to the syntax of XQuery which is like a combination of XML and SQL, as you can see from these user cases. So as David suggested, the easiest way is to first understand how HTML plugin handles embedded CSS and then use the same technique to add syntax colouring in the new XQUERY_XPATH context after going through the XQuery Parser.ย  So now I’m currently going through adding required classes for line stylingย  and parsing.

So my immediate targets are,

1) Add line colouring and parsing XQuery partition

2) Add content assistance through re-parsing

It’s not easy to materialize a parser out of nowhere. But it has to begin from somewhere, is it not ?

Other than that the plugin now has basic support for Preference pages & Outline so they will also be improved as the project goes on.

Here is a peek at the new editor.

A peek at new XQuery Editor

As I may have mentioned previously, without the help of David and other guys at Eclipse IRC I would have been totally lost. There are gaping holes in Eclipse main documentation and most clsss references on SSE aren’t complete. So as that is what any newcomer will look in to when faced with a tricky situation, I truly think more attention must be put into improving Eclipse documentation and who knows, that alone could attract new energy into Eclipse community.

Tagged , ,

Eclipse XQuery Editor – What’s going on ?

/* Will be some what Greek to someone who hasn’t worked with Eclipse, so you have been warned */

Yes, some must be wondering on this. But it all comes to the fact that planning a software project is the hardest part of the procedure, and that I was having a hectic period for last 2 weeks because of my academic stuff. But it’s settling to a steady phase now and I’m having some time to start coding again after a while. Also about planning of the project, my mentor and I talked heavily on the best and easiest path to take by using already existing resources such as the existing XPath parser (which is mostly done by David himself) and XSL plugin.

So now what I’m trying to do now is (and somewhat stuck at),

1) Partition the editor into content types.

2) Use existing content types to read patterns such as XML.

3) Create parsers for XPath2 and XQuery content types.

4) Make AST out of these 2 new content types to do more fancy stuff like content assistance

IMHO these 4 steps are the heart of this plug-in since almost all other fancy UI stuff are based on the success of this. In order to implement those so called fancy UI stuff I will be extending the Structured Source Editor(SSE) since it’s the best course of action for a XML editor.

Another factor that has been lagging the speed of this project is the lack of documentation for SSE and how to make partitioning based on content types. Best support materials I found that could be used practically were few slides from EclipseCon and other editor plugins similar to this such as XSL, XPath, JSP and PHP editors, which David helped a lot suggesting and finding them. It was somewhat hard at first to comprehend the structure of SSE but reviewing these existing plugins helped it.

I’ve created the project at SourceForge Eclipse incubator for now and you can check it out from there as the project goes and I will use this post series to bring news of the progress of my new buddy.

ViewCVS: eclipse-incub.cvs.sourceforge.net/eclipse-incub/org.eclipse.wst.xquery

CVS: eclipse-incub.cvs.sourceforge.net/cvsroot/eclipse-incub/org.eclipse.wst.xquery

More News: http://wiki.eclipse.org/New_Eclipse_Plugin_for_XQuery

Tagged , , ,

Uni. Moratuwa, Sri Lanka – #1 GSoC contribution in 2008

This is just to share the great news that (Drums and ovations) University of Moratuwa, Sri Lanka is by far the most contributed university in the world for this year GSOC in both applied and accepted student number wise .

Google Open Source Blog: This Week’s Top 10’s: Universities for Google Summer of Code 2008

How cool is that ? ๐Ÿ™‚

Proud to be a contributor for this glory as a student from University of Moratuwa and a GSoC participant.

PS: Now I’m thinking of why we can’t have a get together with this year GSoC participants from Uni. of Moratuwa. 93 students applied, wow! That’s a whole lot of crowd. Will need lot of drinks ๐Ÿ˜‰

Another GSoC on the air

Ok, here is another post after a long desert – no excuses here, I’ve forgoton that I even have a blog.ย  But now feel like writing something after seeing the new WordPress dashboard ๐Ÿ™‚

First thing on the agenda is GSoC 2008. As you all know Google Summer of Code 2008 is on the way this year too and in case you have been living under a rock, here is the event.

GSoC is a good breeding ground for fresh FOSS developments and had been one for me last year when I tried GSoC for the first time. Even though initially I wasn’t planning to try out for GSoC this year, after seeing some cool ideas from few organizations I felt like giving a try.

I found 2 ideas from Eclipse foundation and Apache very exciting but finally had to leave out one because I hadn’t enough energy nor time for 2 proposals. So I tried for Eclipse – creating a new plug-in for XQuery syntax editing which I found the idea is most appealing. One reason is I had been working with XML and Java stuff for a longest of my time and second one is I’ve been using Eclipse for my python works, so felt like returning the favour.ย  So I prepared the proposal, submitted it and got accepted this year round too ๐Ÿ™‚ All thanks should go to my mentor David and congrats to my fellow Vesess colleague Sameera, who also got accepted for GSoC this year for Coppermine photo gallery. By the way, if this helps any future GSoCer, here is my complete proposal.

But beyond my not-so-dramatic GSoC tale, I was able to give something else for GSoC.

First thing is I submitted a translated Sinhala version of GSoC flyer this year. The second is I was able to put a small guiding doc for Gnome GSoCers, doing my things right as a responsible Gnome GSoCer last year.ย  Other than that, I was able to encourage few of my buddies to apply for GSoC rather than trying for evil MS Imagine Cup ๐Ÿ˜€

So the end of the line is that I’m hoping for another nice, fruitful 3 months with GSoC working for Eclispe and hope the experience will be great as was in last year.

Tagged , ,

An unexpected guest

An unexpected guest dropped by (literally) my home today.

If the image is not clear, it’s a poor porcupine -wandering near by woods and dropped into pit where a new house is being built. Seems these poor guys don’t have enough room with all the construction works going with horrible humans.