Hello!<br><br>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:<br><br><b>1. New Project templates</b><br>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 [1]. 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. <b><br>
<br></b>I will not change existing templates or currently accepted variables, so everything will continue to work. <br><br><b>2. File templates</b><br>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. <br>
<br>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. <b><br>
<br>2. a) Writers</b><br>There is a great Qt template library called Grantlee[2] 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 variables. <br>
<br>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 filters. <br><br>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. <br>
<br><b>2. b) Users</b><br>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. <br>
<br>[1]: I'm still not sure what the correct terminology is. KNewStuff, OCS, or something else. In any case this is where you download themes and plasmoids from.<br>[2]: <a href="http://www.gitorious.org/grantlee/pages/Home" target="_blank">http://www.gitorious.org/grantlee/pages/Home</a><br>
<br>Regards, <br>Miha <br>