[GSoC] Templates in KDevelop – Final Report

This year’s Summer of Code is coming to an end, and so is my project. I’m spending the last days until the “pencils down” date reorganizing the code, looking for crashes and memory leaks, and writing online documentation. There are no groundbreaking features since the last report, but the functionality is becoming really solid, and I have a feeling that everything is coming together.

During the last weeks, I made sure that any kind of file template is supported by KDevelop, but only Class and Test template get special attention with additional assistant pages. I’ve ene put together a small flowchart of the assistant to illustrate what pages each type of template gets. Because templates can expose their own custom options, one can write some complex templates with no changes to KDevPlatform code. To test code generation for other types of files, I added a template for CMake Find modules. This means that writing almost any kind of boilerplate can be avoided with a good template.

I also tried to make creating new templates as easy as possible. Apart from a toolview which gives you a preview of the current files as it would be renderer as a template, it is now also possible to extract any loaded template archive, edit it manually, and then import it back with KDevelop. I believe that most people will try to use an existing template with some minor edits, so this is an important usecase. Additionally, there is a project template that generates a project with a single class template.

I would also like to thank my mentor, Milian Wolff. He really stepped in during the last month, not only giving me advice but even fixing my mistakes. The template selection now looks much better, and is consistent between project and file templates.

Finally, I had to document all this. I wrote specifications for both kinds of templates, added tutorials for creating new templates, as well as instructions for using existing ones. Writing may not be the hardest part of a summer project, but it’s certainly the least enjoyable for me, so I hope that what I did produce is both understandable and sufficient.

Advertisements

5 responses to this post.

  1. Posted by Filipe Saraiva on 19. August 2012 at 19:46

    Great work Miha, congratulations!
    Now create a Cantor backend will be easy! =D

    Thanks.

    Reply

    • Posted by noughmad on 20. August 2012 at 11:20

      True, but are there any more programs that need one? I mean, aren’t there already 8 or so?

      Reply

  2. Hi

    I know this is quite off topic, but could you tell what application have you used to create that flowchart?

    Reply

    • Posted by noughmad on 20. August 2012 at 11:15

      Yes. It’s from a Google docs template which you can find here.

      I tried using Calligra Flow, but I couldn’t get it to display a flowchart without freezing. I don’t know any other ones, so I went with the first google result.

      Reply

  3. Have you ever considered publishing an e-book or
    guest authoring on other websites? I have a blog based upon
    on the same ideas you discuss and would love to have you share
    some stories/information. I know my audience would value your work.
    If you’re even remotely interested, feel free to shoot me an email.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: