Eclipse XQuery – a breakthrough at last…

Last 2 weeks were very productive for the new xquery editor and finally able to get a breakthrough in the project.

I was trying to work out xquery syntax colouring as I thought it is what someone would be expecting first from an editor. So finally it was completed by this weekend and you can see how it is working in the screenshot below.

When first I was thinking how to tokenize the text it was looking pretty gloomy because it would have taken a good amount of time to write ANTLR grammar file, generate tokeninzing scripts and finally fine tune them. But thanks to xqpretty tokenizer it was pretty easy for me to skip first 2 steps and directly go to 3rd step and fine tune it to my needs.

So I tested a good amount with the tokenizer to see whether it meets my requirements for the plugin and also Eclipse standards like license issues (As usual David was a huge help in these matters). Then I had to generalize token types to something around 10 because it was not manageable with more than 100s of token types.  After this was done I added required classes to provide text colouring such as PreferenceInitializer and LineStyleProvider. Then with some more bug fixing and mucking around finally got the required result.

But mind you, this is not completely tested nor bug free. I already have a list of bugs to fix regarding text parsing and some more runtime errors. So if you have a thing for xquery and some spare time, grab a copy please and list any error you see in text parsing (For now you will have to grab a copy from SF  using the address stated below but I’m now working on an update site for the project so it won’t be that hard then)

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

Eclipse-XQuery Syntax Colouring

Tagged , ,

9 thoughts on “Eclipse XQuery – a breakthrough at last…

  1. Very cool, good to see progress is being made. I can’t wait to see the work end up in the WTP Incubator!

  2. Laknath says:

    @Chris Thanks 🙂 Moving the project to incubator will be great to gain more hands for testing and will be a huge help to improve. We are hoping to do it in the near future.

  3. Congrats, this already looks really good. Do you have any patches for the XQPretty library? I’d be happy to include them, one way or the other.

  4. Laknath says:

    @Martin Hay Thanks for this cool tokenizer 🙂 If it wasn’t for xqpretty I would be wasting a good amount of time trying to get something remotely resembles a tokenizer into working.

    I’ve got few bugs saying that text editor is not colouring some long and complex xql scripts. It could be due to some issues in the library or my text editor. So if it’s an issue with the parser and there’s any patch for it I’d definitely send it to you.

  5. dan says:

    Damn windows user!

  6. Laknath says:

    @dan Slow down buddy. I’m not a windows enthusiast in any kind of way. I use Ubuntu for all of my works except Eclipse. For some unknown reason Eclipse is performing very slowly in my Ubuntu copy. So had to temporally move ONLY Eclipse into Windows.

  7. MB says:

    I’m looking forward to seeing the finished plugin.

  8. Fieral says:

    Hi, can you, please, provide any http or ftp link for simple downloading the plugin?

  9. Benoit Guerout says:

    Hello,

    i’m acutally unable to test your plugin on Eclipse Ganymede SR2.

    http://eclipse-incub.cvs.sourceforge.net/eclipse-incub/xquery_update seems not to be recognized as a valid update site.

    Manual installation fails too.

    Any ideas ?

Leave a Reply to MB Cancel reply

Your email address will not be published. Required fields are marked *