Code completion proposal for GtkSourceView



Hi all,

After givin to the subject some thought, and seeing that this item has
been onn the wishlist for some time now, I've drafted a simple
proposal for implementing code completion in GtkSourceView.

The draft is written here:
http://devel.emmanuelebassi.net/papers/gtk-source-completion-engine.html

And in Wiki form here:
http://wiki.emmanuelebassi.net/index.php?GtkSourceCompletionEngine

+++

Since knowing how to complete code is something that it's bound to
each language (e.g. in C you could just match each word under the
cursor, optionally opening each #included file - but in Java you have
to scan through the packages and match the namespace before the point;
the same in Perl, but matching the double colon), we cannot implement
a code completion for each language. Plus, code completion could
require language introspection, or metadata handling; thus, code
completion is a tricky and per-language thing.

Basically, the idea is to create a base class, and let each user
implement its own code completion method (with a basic "string match"
for a start); we could also offer a standard UI for showing the
alternatives.

I plan to write up some preliminary code this weekend. If anyone has
suggestions or objections, I'd like to hear those (here on the list or
on the wiki). :-)

Regards,
 Emmanuele.

-- 
It is against the grain of modern education to teach children to program.
What fun is there in making plans, acquiring discipline in organizing
thoughts, devoting attention to detail, and learning to be self-critical?
                -- Alan Perlis



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