← Back to team overview

valable team mailing list archive

Re: Me, Myself and Valable

 

On Thu, Apr 16, 2009 at 15:46, Didier "Ptitjes" <ptitjes@xxxxxxx> wrote:
>
> - There is no outline
> - Completion does not work too

Both outline and completion (though sub-optimal implementations)
*were* working (may require ctags):

    http://bleb.org/software/valable/valable-4.png
    http://bleb.org/software/valable/valable-5.png

The first thing to do, I think, is to produce a better in-memory
abstract source tree (AST) representing the code. If Valable was a
"proper" plugin, it'd then be editing and maintaining this tree; only
dumping out the source code when necessary. This'd allow proper
refactoring and code completion etc.

To that end, I started trying to write an object-oriented JNA-based
bridge to libvala, to use the same mechanism as valac to parse the
source code and uses *its* AST as a starting point.

I sent the source code for that to Johann, with the following email:

--------8<--------
I've uploaded my source tree to:

   http://bleb.org/software/vala-parser.tar.gz

The main script is vala/vapi2java.vala. My basic test has been running
this over vala.vapi to get a libvala API into Valable.

What (mostly) works:

 * Reading the VAPI definitions using libvala (in Vala)

 * Outputting the Java interfaces corresponding to the Vala class
   hierarchy.

 * The JNA helper which helps generates dynamic proxies to
   implement the Java interfaces, backed by JNA calls.

What's not done:

 * Implementing the JNA interfaces corresponding to the
   C libraries.

The final one should be straightforward (why it's not been done): I
was leaving it until I could iron out the compilation problems from
the interfaces.

I suspect it's probably an evening of concentrated hacking away from
being usable. Let me know if you've got any questions.
-------->8--------

I don't have much, if any, time to hack on this at the moment - but
happy to give opinions/advice :-)

Cheers,

Andrew

-- 
Andrew Flegg -- mailto:andrew@xxxxxxxx  |  http://www.bleb.org/
Maemo Community Council chair



References