Behind the scene, it uses span information of the selected path to recover the file content and highlight the key and the value. The app is in Vala and uses Gtk toolkit.
The prototype as of now is only a viewer. This could be extended in many ways:
- Edition capabilities, where the tree and the text are synchronized as the user types
- Providing a view to query and display results
- XPath expression builder, so that they can be validated and then used in scripts
- Highlight the whole match for a sub-tree The information is available from the span, but I haven't been able to set alpha channel for colors in Gtk.TextView. Using pango/cairo/webkit based widget to display the text may be the solution.
Vala is quite nice, I like the idea of having bare metal binaries and the integration with Augeas with the bindings works great, documentation on valadoc.org is excellent. However, GCC complains because of the C code generated and it's a bit annoying part of it is my fault (using deprecated stuff, like Gtk.Box() for instance). For more code examples, I'm using yorba projects as reference, like geary and shotwell. Finally, debugging is not as convenient, because of the additional layer of code generation.
The code is on github: https://github.com/giraldeau/augedit