All posts by Dominik

Dominik is a PhD student at the Control Theory and Robotics Lab, TU Darmstadt, as part of the Research Training Group GKMM (GRK1362). My research focuses on state estimation in distributed systems. As hobby, I contribute to the KDE project and work on the Kate application and editor component.

Akademy 08: Kate Flashback

This Akademy’s Kate changes include

  • fix: drag & drop of text
  • code completion: only show group header if the group name is not empty
  • reintroduction of buffer blocks in Kate’s document buffer (one buffer contains up to 4096 lines). The blocks build a linked list. Editing a 500 MB file kind of works now again. It’s still rather slow, though.
  • more speedup in Kate’s document buffer
  • Kate is using KEncodingProber instead of KEncodingDetector now
  • generate internal version of KatePart automatically, so developers don’t have to adapt it manually each release
  • python encoding detection plugin that warns if encoding is not correct while saving
  • new plugin: Backtrace browser, mainly for developers
  • find in files: several speed optimizations
  • find in files: progress indicator while search is active
  • find in files: redesign of workflow. Search happens with non-modal dialog and results are shown in toolviews.
  • lots of vi mode changes
  • lots of bugs closed, mainly old ones
  • some real bug fixes…
  • things I forgot

Kate: Fast backtrace navigation

I’ve added a new plugin to kdesdk/kate/plugin: a backtrace browser. It’s meant for developers and probably of no use for users. What does it do? It shows a backtrace delivered by gdb in a listview in a Kate toolview. Clicking on an item opens the selected file and jumps to the correct line number. It works for backtraces generated on your own machine, but it will also work for backtraces from other people, i.e. with /home/dummy/qt-copy/…/qwidget.cpp will still be found on other machines. For that to work, you have to index the directories where the source code is located.
Sometimes there are several files with the same name, e.g.

  • trunk/kdegraphics/okular/generators/dvi/config.h
  • trunk/kdepim/mimelib/mimelib/config.h

To pick the right choice, the plugin picks the last two parts of the url, in this case this would be

  • dvi/config.h
  • mimelib/config.h

and then usually finds the correct one. Indexing trunk/KDE and branches/KDE/4.1 of course will lead to a clash, now way to fix it. Maybe I could present a list of valid files to the user and let the user pick the right one. I don’t think that’s necessary though for now.

How to configure

  1. Enable the plugin: go to Settings > Configure Kate > Application Plugins and enable ‘Kate Backtrace Browser’
  2. A config page appeared, so click on it and add the directories containing the source code
  3. Clicking OK will start indexing. It will take some time (the index of kdesupport + kdelibs + kdepimlibs + kdebase + kdesdk + playground/plasma + plasma-addons + kdevplatform + kdegraphics is about 6MB)

When indexing is finished, open the toolview “Backtrace Browser”. Now you can load a backtrace from the clipboard (e.g. when you clicked “Copy to Clipboard” in Dr. Konqi) or from a file.

Hope it’s useful :)

Do you understand the word HTML?

During the Kate developer meeting we also thought about simplifying KWrite and how to make the decision whether KWrite should be launched in full featured mode or in a stripped version. …well, and we found a really funny idea:

Note, that this would even work, the question would be rather annoying, though :) The solution right now is to always start KWrite in a simple mode. Mostly only actions are hidden in the menus (@distributors: kdelibs/kate/data/katepartsimpleui.rc), but you can also change c++ code at Kate part level, as there are some functions:

  • bool KateDocument::simpleMode() (kate part internal), and
  • bool KTextEditor::Editor::simpleMode() (along with setSimpleMode())

This way config dialogs can be adapted depending on the mode as well. Ah, and if you want the normal mode back, go into the KWrite settings and enable [x] Enable Developer Mode. Then restart KWrite.

PS: Tackat, we came up with this image before our phone call. That’s why it was really funny when you said HTML is something that should not be removed. hehe… :)

Kate Meeting: Day 1 and 2

The Kate Developer Meeting was a productive weekend and once more shows how important the developer sprints are. The summary will be on the dot shortly. Work already started on several topics. As everyone want screenshots, here we go: The new annotation interface available now in KTextEditor can be use to e.g. show svn annotations directly in kate:
basysKom’s coffee maching is simply the best: It can do everything, you just have to press the right key combos: