Skip to content

Posts 

Quick Compiling Kate in a stable KDE Environment

Saturday, 17 April 2010  | Dominik Haumann
Since all of the Kate code is now co-hosted on gitorious, it became very easy to build Kate in your stable KDE >= 4.4 environment. This means you can run the newest version of Kate with very few effort. Just give it a try and do the following steps: make sure you have the following packages installed: git, cmake and kdelibs development package (on openSUSE this is git, cmake and libkde4-devel) create and change into a KDE development directory: mkdir ~/kde; cd ~/kde get a copy of the Kate code: git clone git://gitorious.org/kate/kate.git create and change into a build directory for compilation: mkdir build; cd build run the configure process with cmake: cmake ../kate -DCMAKE_BUILD_TYPE=debugfull <br /> -DCMAKE_INSTALL_PREFIX=~/kde/usr compile Kate: make finally install Kate: make install That’s all! This installs Kate locally into the separate directory ~/kde/usr, so that your global KDE installation will not be touched at all. Read More

Kate Internals: Text Buffer

Tuesday, 2 March 2010  | Dominik Haumann
Right now, in Kate’s gitorious repository we, or rather mainly Christoph, is rewriting the heart of Kate: The text buffer. In this blog I’ll explain how the text buffer works in detail. After reading, you’ll be able to understand the code. And be warned: Probably you will be desperately amazed about its awesomeness! So this is a must read :^) Storage. Kate Part internally stores the content of a text document as a QVector of text lines. Each text line holds the text in a QString object as well as additional data like color attributes for highlighting. Inserting and removing text lines implies inserting or removing items in the QVector of the text lines. This is can get slow when there are thousands of text lines in a document, because QVector has to move the memory every time. Thus, to keep text operations fast, Kate splits all text lines into several text blocks: Each text block contains a certain amount of lines (e.g. 256). The expense of memory movement is then always limited. When a text block grows too much, it is automatically split. When the amount of lines in a text block shrinks, it is merged with the previous text block. In other words, Kate’s text buffer automatically balances the text blocks. The basic idea of Kate’s text buffer, the text blocks and text lines looks like this: Read More

Design Ideas of the Kate::TextBuffer

Sunday, 28 February 2010  | Christoph Cullmann
Storage Basic idea: text stored as lines Lines hold text and additional data (like for highlighting) Advanced Concept: Stores lines in blocks of xxx lines, to have better performance Cursor Support They will move on editing Cursors can be combined to ranges KateTextCursor will be stored in the buffer blocks Transactions Each edit action must be encapsuled in a transaction startEdit/endEdit will do this Signals for starting and ending this transactions Revisions After loading, buffer has revision 0 Each edit action which is no nop will lead to increment in revision number Successful saving will reset revision back to 0 Editing Operations (only 4 different editing primitives) Insert Text (inside one line) Remove Text (inside one line) Wrap Line (wrap a line at given position, create a new line with content behind wrap position) Unwrap Line (unites the line with its predecessor) Signals for all of these actions, containing the change (to allow to layer undo/swap file support/…) on top of the buffer Load/Save & Encodings Loading will try to use given codec, if that doesn’t work, try to detect the codec by the BOM at start of file or use fallback codec, if that again doesn’t work, given codec will be used again, and errors reported Saving will just use the given codec Unit Tests Each of the above implementation details will be covered by unit tests KateTextBuffer (+KateTextLine and Cursor) must therefor be usable without other components

Kate Partly Moving to Gitorious

Saturday, 27 February 2010  | Dominik Haumann
We are about to move the applications Kate and KWrite as well as the libraries KTextEditor and Kate Part to gitorious. Christoph is working on the migration right now in order to keep the development history. Things look good so far, so the migration is soon finished. We have discussed a bit about the migration to gitorious on the Kate Developer Meeting and Christoph came up with this mainly because building only KTextEditor, Kate Part, KWrite and Kate is much faster and easier compared to building the KDE modules kdesupport, kdelibs, kdepimlibs, kdebase, kdesdk. I myself remember the time where I started KDE development, and it took more than two weeks to have a first successful build of KDE. You have to learn so many things at once, like revision control, lots of so far unknown software, and what not. Talking to other developers verifies this. In other words: Getting into KDE development is not easy and straight forward. Moving to gitorious removes this barrier for Kate development: You just checkout the Kate repository and that’s all you need. It would be nice if you join Kate development and contribute patches :) What does that mean for Kate in KDE? Nothing changes. We will merge the changes in Gitorious back to the main KDE development line and vice versa. Read More

Kate Highlighting for QML, JavaScript

Friday, 26 February 2010  | Milian Wolff
Hey everyone! I’ve started my internship at KDAB this week, it’s great fun so far! Though I spent most of my time this week on Bertjans KDevelop plugin, I couldn’t resist on a bit of Kate hacking: steveire is experimenting with QML so I couldn’t stop but notice that there is no highlighting for it in Kate. Well, there was none ;-) Now you get pretty colors, rejoice! Read More

Kate Highlighting for QML, JavaScript

Friday, 26 February 2010  | Milian Wolff
Hey everyone! I’ve started my internship at KDAB this week, it’s great fun so far! Though I spent most of my time this week on Bertjans KDevelop plugin, I couldn’t resist on a bit of Kate hacking: steveire is experimenting with QML so I couldn’t stop but notice that there is no highlighting for it in Kate. Well, there was none ;-) Now you get pretty colors, rejoice! Read More

Kate/KDevelop HackSprint – Up To Day 4

Wednesday, 17 February 2010  | Milian Wolff
Woha, quite a few days flew by without me blogging about anything. Thankfully the others started to write so I don’t have to repeat it all ;-) Instead I’ll concentrate on stuff I did or learned. GHNS for Snippets Well, first I think an excuse is in oder: There is a GHNS button for Kate Snippets in 4.4.0 but it’s broken, neither me nor Joseph had time to acutally use and fix it… But anyways, I fixed it now for 4.4.1. For 4.5 we’ll also have an Upload Dialog. Read More

Kate/KDevelop HackSprint – Up To Day 4

Wednesday, 17 February 2010  | Milian Wolff
Woha, quite a few days flew by without me blogging about anything. Thankfully the others started to write so I don’t have to repeat it all ;-) Instead I’ll concentrate on stuff I did or learned. GHNS for Snippets Well, first I think an excuse is in oder: There is a GHNS button for Kate Snippets in 4.4.0 but it’s broken, neither me nor Joseph had time to acutally use and fix it… But anyways, I fixed it now for 4.4.1. For 4.5 we’ll also have an Upload Dialog. Read More

The Power of Developer Meetings

Wednesday, 17 February 2010  | Dominik Haumann
Since several years, we have lots of small developer meetings in the KDE project, gratefully supported by the KDE e.V. There, developers of a certain project (e.g. KMail/kdepim, Plasma, you name it) meet to discuss further plans and to push the project further. From experience we can tell that those meetings are really beneficial in several ways: Social aspect: You get to know the other developers involved in the project in real life, which is a great motivation factor. This also happens at KDE’s annual conference Akademy, although there are a lot more people. Productivity: Since you are sitting next to each other discussions about how to do what are very focused. It’s amazing how quickly a project can evolve this way. (I haven’t seen such focused work in companies, yet. I guess the variance in the knowledge of people involved is higher. And the motivation is usually very different). Knowledge Transfer: Since participants are experts in different areas, discussions lead to knowledge transfer. This is essential, as sometimes developers have very few free time to contributes to a project. Spreading the knowledge helps a lot to keep the project alive. Steady Contributions: We are always open for new contributors. Just send a patch, get commit access and join development. Experience shows that participants of a developer meeting usually contribute for years to come. Enough said, here is what happened the last three days in Kate: Read More

Developer Meeting: More on scripting Kate

Wednesday, 17 February 2010  | Dominik Haumann
We are 10 people here at the developer meeting in Berlin. Kate, KDevelop as well as Okteta see a lot of commits. I’ll mainly talk about what’s happening in the holy Kate land, though :-) Yesterday I closed a bug requesting an “unwrap” feature in Kate that works like “Tools > Join Lines” but maintains paragraph separation, i.e., empty lines are not removed. This feature is implemented now in javascript. Further infos: Read More