GSoC – Kate Code Folding (Bug-less)

Hi everyone!

Another season of Google Summer of Code is approaching its end. :(

I feel pretty bad about that, because I enjoy it and I love working on Kate.

I used the last two weeks to solve all the bugs and requests (folding related) from If you find any folded related bugs, please send the report using and I will solve them (the warranty period is unlimited, so you don’t have to worry about that ;) )

The next two weeks (the time remained until the dead line) will be used to write the documentation and to do some look changes, according to the code reviews received from the Kate community. Also, I will write some tests. Writing automatic tests for the folding is not such an easy task because you have to check a lot of stuff: the highlight, the folding sign, the folded lines, the line that remains visible and other things. And there are so many languages that act differently. That’s why I preferred to do the tests manually, so far. Anyway, I will write some units that will test the bases of the code folding, like number of lines left after a folding or some delete/insert operations occurred.

I consider this project a success and I hope that the Kate team has no regrets for choosing me for this GSoC season. :)

Enjoy Kate’s new code folding! ;)


8 thoughts on “GSoC – Kate Code Folding (Bug-less)

  1. > I feel pretty bad about that, because I enjoy it and I love working on Kate.

    Well, we hope you continue to contribute. GSoC is just an way to lower the barrier to getting started after all :-)

    1. Of course that I will continue my contributions for Kate.
      Actually, a couple of faculty colleagues and members of “The free Open Source Development” came up with a very nice idea. They want to involve some of the participants of this course in some open source projects, like Kate. Me and Diana, former Kate – GSoC participant, will be their mentors during this project. The project would have place this Autumn. I talk to Christoph and he enjoyed the idea. If you will all agree with this idea, I might be a real success. :)
      What do you think? :)

  2. No reason to stop! Sure, perhaps you will have less time, but you can still continue :) I mean, its one of the main goals of the SoC, to get more people into coding, not only during the summer.

    Keep up the good work!

  3. Writing tests is not hard, quite the contrary. The goal is not to write one test which cares for everything. Write small tests which test one thing and test it good….

    /me still hoping you will write some unit tests….

    1. These weeks I’ll do that. :)
      I will send an email on Kate’s mailing list when the first tests will be up.

      1. The first test could be:
        1. insert some c++ text
        2. fold several nested regions
        3. get the state (list of lines + columns)
        4. reload
        5. get the state (list of lines + columns)
        6. compare both states to verify it is still the same

        This test would cover several features / bugs we had in the last time. This test only takes 15 lines of code I guess, so it’s indeed not too hard.

        1. For 3 and 5: Is there a way to access the content of the visible lines? (the lines that are displayed in the editor) ?

          Thanks for the tip Dominik :)

          1. Why do you need to access the visible lines?
            Just save the entire code folding state with the functions saveFoldingState and applyFoldingState. You can declare the test as friend class so it can access the private member variables (the qlists).

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top