Sometimes I write things, sometimes I don't.

To content | To menu | To search

GIR for java-gnome: update week 28

java.pngLike I said last week my goal was to produce a more maintainable code. I took advantage of this need to rewrite the code to use the data structures provided by the java-gnome code generator to handle the current parsing of .defs files.

So the first part of my work was to simplify the XML parsing. I decided to use the XOM library. I choosed this library because it is quite easy to use and it is also fast enough for our parsing needs. It can handle namespaces which is important when parsing XML Introspection data and it provides several classes and methods to manage XML elements and attributes. The use of XOM adds two new dependencies for the build process of java-gnome: XOM and Jaxen (Jaxen is actually a dependency of XOM). These 2 dependencies are available in Debian and Ubuntu and probably other distributions too. I started to work on adding checks to the build system to handle the new dependencies. The patch is almost done but need some tiny polishing to be commited.

The second part of my work was to reproduce a parser like the currently used DefsParser. Write a parser that work in the same way will save some time when it will be fully complete. The idea is to be able to use the Introspection parser in place of the .des parser in an easy way. To do such a thing I decided to use the classes available to help us representing all the objects with their methods, virtuals and more. The available Introspection parser is able to parse a good set of GIR data but there are several fixes in the staging area of my local Git branches. I will probably commit and push them in a day or two.

The goal of the next week will be to improve the parser and try to compare the results that it will give with the results from the DefsParser. I will also work on the detection of the .gir files in the operating system files so we do not have to embed them in our java-gnome Git tree.

Comments

1. On Monday 15 July 2013, 11:44 by JumpLink

Nice Project :)
I've create added an example to generate Valabindings for Java with Valabind: https://github.com/JumpLink/vala-ob...
do you think that will be possible with your project? If so I would love to add an example for your project.