Re: [Vala] Autocomplete with Vala



Hi Kevin,

On Thu, 2007-09-27 at 14:18 -0400, Kevin Kubasik wrote:
First, let me say that Vala is awesome. I've started to play around
(mostly little test programs to get a feel for it) and I've not only
been blown away by how complete the system is, but how _real_ the
execution was. (as in, real C, really compiled ;) )

Thanks!

Anyways, I currently do a lot of development under Mono, and have
really grown attached to code completion. I know lots of people see
[...]
;) ) but to hit a real development stride, Ctrl+Space is a big part of
my development rhythm.

I certainly would like to have code completion for Vala, too :)

While the obvious political choice is Anjunta (as the quasi-official
Gnome IDE) or Eclipse (the defacto Open Source IDE standard) I'm more
inclined to look at a little less public option. Monodevelop has
become quite stable, and I use it for most of my new code in C#. While
I ignore most of its project models and still just have a terminal for
my 'make' and 'make run' tests, I add all my sources and library
references and I get lovely, inline autocomplete, with
documentation/declaration tooltips.

While I'd like to work on IDE integration for Vala, I probably won't
work on anything like that in the near future as stabilization and
documentation of the language and the compiler are more important
targets for me right now. One advantage of using Anjuta or another
GObject-based IDE is that we could write the Vala language support
plugins in Vala itself and I like that thought. However, I certainly
don't want to keep anyone from adding Vala support to MonoDevelop or
Eclipse, they are both great IDEs.

My plan would be to add the core functionality for code completion to
libvala (or maybe a library on top of it), so that IDE plugins would
"just" be about the integration in a specific IDE and use libvala for
the heavy lifting. This might make the IDE question less important as we
could share a large part of the code.

The mono compiler produces an intermediate language (often called
simply IL) which is quite easy to parse and manipulate, this makes
extracting autocompletion sources from existing system libraries
without access to the source possible. This is where I stonewall. I
would be more than willing to help get some rudimentary Vala support
working in Monodevelop up to this point (parsing and completion of
in-project source types), but the next step is a real brick wall for
me. I have the following questions:

That's fortunately not that difficult. Each Vala library and each Vala
binding for a C library installs a VAPI file in $prefix/share/vala/vapi
with all the necessary information. libvala can parse these VAPI files
and you can read out all the information you want. We might need some
binary cache files to get that going fast enough for code completion but
the API information is easily accessible.

Regards,

Jürg




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]