Project and file templates
mail at milianw.de
Sun May 20 19:18:53 UTC 2012
On Tuesday 15 May 2012 17:04:31 Miha Čančula wrote:
> My name is Miha Čančula and I'll be working this summer on a template
> system for KDevelop. My work is divided into two major parts:
Hey, very good initiative :) I also wanted to write you an email and see how
you are doing and how your plans are for GSOC.
> *1. New Project templates*
> KDevPlatform now includes a plugin called kdevappwizards that reuses
> templates from KAppTemplate. Additional templates are also included by
> various plugins. However, this is no simple way of importing your own
> templates, or sharing them. That's why I plan to implement loading
> templates locally and getting new ones from OCS . Apart from the sharing
> capability, there will be no major changes here, so you'll be able to
> continue creating new projects as you did so far. *
> *I will not change existing templates or currently accepted variables, so
> everything will continue to work.
> *2. File templates*
> I would also like to extend the "Create Class" dialog using templates. This
> will be a major change, and it's also use much more frequently. Therefore I
> would like some input from both users and possible writers of such
> Templates are good not only because of support for different languages, but
> there are also different styles of classes in the same language. The most
> notable examples are probably QObjects with their macros, C++ classes with
> private D-pointer, and also new-style vs. old-style classes in Python.
> Using a template it would also be possible to generate a pure C struct with
> method-like functions. *
> 2. a) Writers*
> There is a great Qt template library called Grantlee by Stephen Kelly.
> It features the same syntax as the better known Django, so it is note some
> obscure language. In comparison with KMacroExpander used for app templates,
> it supports for loops, if statements and calling some functions on the
> I have already used it, so I'm familiar with its syntax and built-in
> functions (called filters). It is also possible to expose additional
> However, if people express a wish I can also implement a simpler system
> like the one for project templates. It is less powerful, but may be better
> suited for simple templates. The lack of loops is the major drawback here.
> If any of the prospective template writers has other ideas and/or wishes,
> please voice them to me.
+1 for Grantlee. Stephen will likely help you out if you hit any walls in
using his library.
> *2. b) Users*
> >From the user point of view, the new functionality would consist of
> selecting a template, and an extended "Create class" dialog. There you
> could define class members and methods. I think that especially for C++,
> declaring a list of properties and having the template engine autogenerate
> accessor methods is a great time-saver. Again, if you could think of
> anything else that would simplify life for users, please share.
Also, if you are at it, please keep other languages in mind. E.g. a way to
make it simpler for Sven to write Python-specific "create class" stuff and
similar for me with PHP etc. would be very helpful.
Cool, looking forward to mentoring you over the summer. If anything comes up
don't hesitate to ask me (or us).
mail at milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 198 bytes
Desc: This is a digitally signed message part.
More information about the KDevelop-devel