New KateTextBuffer

Christoph Cullmann cullmann at absint.de
Mon Feb 22 22:11:18 UTC 2010


Milian Wolff wrote:
>> I first plan to write it and test it and then convert Kate part's
>> internal smartcursors to it.
>> Then at least katepart doesn*t use this ....
>>
>> Then eventually this will become a "really smart"cursor interface for
>> KTextEditor.
>> And that would be the end of the smart land, but that is future, first
>> need to have something.
>>
>> As I think, even with unit tests for the buffer, which I intend to write
>> from the beginning on,
>> this will break kate part in small not-working pieces at least for 1-2
>> weeks, all this work will be done in
>> git and only if I get back a stable katepart this will be synced to
>> kdelibs for KDE 4.5.
>>     
>
> Don't forget the profiling, but I bet you're design will probably be more 
> efficient anyways.
>   
I hope so, this time this all will be done once right from start,
with tests, with documentation and with design :P

> And did I get you correctly, that one will never get any kind of notification 
> about the smart cursors?
>   
Yes, there won't be any notifications. Cursors will just move, Ranges, too.
As soon as a range is empty, it will be marked invalid.

> As long as you don't delete cursors inside kate, but let the owner == creator 
> handle that, listening to textChanged et alii could probably be enough.
>   
Yes, there will be no deletion of cursors or ranges in any sense. Ranges
will only become invalid,
if they shrink to zero, but be never deleted. Cursors just move around.
(as otherwise strange things can happen)

> Maybe you could write David a mail and ask him about his requirements?
>   
I CC kdevelop-devel with this mail.
I will develop the new buffer/cursors/ranges + textlines in the kate git
repository, comments are welcome.

> Night - Milian (who still kinda fears that you will make us KDevelop 
> developers lots of work :P)
>   
Night ;)
First I will make me a lot of work, I guess this rework will take some
time. First I will implement it
in some playground, with tests, then think about how to change kate's
code to use it. (while still letting smartranges/cursors
live)

The new buffer should allow me, too:

1. Easier to implement undo/redo on top
2. Easier way to implement vim like swap files
3. Revision handling by default

Greetings
Christoph

-- 
-------------------------------------- Christoph Cullmann ---------
AbsInt Angewandte Informatik GmbH      Email: cullmann at AbsInt.com
Science Park 1                         Tel:   +49-681-38360-22
66123 Saarbrücken                      Fax:   +49-681-38360-20
GERMANY                                WWW:   http://www.AbsInt.com
--------------------------------------------------------------------
Geschäftsführung: Dr.-Ing. Christian Ferdinand
Eingetragen im Handelsregister des Amtsgerichts Saarbrücken, HRB 11234





More information about the KDevelop-devel mailing list