Improving generic KPart support in KDevelop (by example of Okteta)

Friedrich W. H. Kossebau kossebau at kde.org
Tue Aug 4 12:35:20 UTC 2009


Hi,

I am the author of Okteta, the KDE 4 Hex Editor^, and currently working on 
integrating Okteta (and maybe more development related tools) as much as 
possible into KDevelop (see ^^ for some blogging about that). Because I think 
KDevelop is getting great, and I want to add to that my little 
contribution :)

^ http://utils.kde.org/projects/okteta
^^
http://frinring.wordpress.com/2009/07/24/shorttip-viewing-raw-data-of-files-in-konquerorkdevelop/
http://frinring.wordpress.com/2009/07/29/binspekt-kpart-for-reuse-in-kdevelop/


Which means I am now doing some stress testing to the KPart support in 
KDevelop, I hope you welcome that ;) Thanks to Andreas for already quickly 
fixing a crash on general KPart loading :)

So far things are working quite okay. But they can do better. I haven't dived 
too much into the KDevelop sources and might not have the time to do so, 
which means I would be glad if some of you interested in better KPart 
integration could help out in doing the needed changes on the KDevelop side 
(or point me to where I could try to patch things).

Following are four things that are stoppers for a good show-time of KParts in 
KDevelop:

Bug: Usage of groups in XMLGUI
------------------------------
What is the reason for all the grouping with e.g. "<DefineGroup 
append="new_merge" name="new_merge"/>" in kdevelopui.rc?
This breaks proper integration of all non-Kate KParts. Just load an image and 
see "Save As..." and "Properties" added as last items to the "File" menu 
instead of where "ui_standards.rc" would place them. I for now "fixed" the 
oktetapartreadwriteui.rc file by also making use of the groups, but this is 
KDevelop-specific and a broken hack.

Bug: Save/Revert for ReadWriteParts
-----------------------------------
Are there any reasons save/revert actions are not offered out of the box for 
ReadWriteParts in KDevelop?
A KPart::ReadWritePart implements both a "save()" and a "saveAs(const KUrl&)" 
method. So I would have expected that KDevelop itself sets up these actions. 
But it doesn't. And it also doesn't include them in the actions "Save All" 
and "Revert All". Not what is expected :)

Feature: Embedded tool views
----------------------------
How to support tools which have a small control/tool view that is embedded and 
not a dialog?
Okteta has a small set of tools like checksum, strings extraction, filtering 
or statistics (see ^^^ and ^^^^ for pictures). New for KDE 4.4 will be also 
embedded Go-to, Select, Find/Replace views similar to how Kate does it. It 
would be good if is possible to also offer access to these two kind of tools 
from Okteta and other non-Kate parts (perhaps by some extension of the KParts 
system).

Feature: Statusbar items
------------------------
Could there be an option to show statusbar items like the KPart has for 
row/column?
For Okteta this would be e.g. the offset, but some other status information 
might be wanted, too. See ^^^ for examples.


^^^
http://frinring.files.wordpress.com/2009/06/okteta-0-3-new-features.png
^^^^
http://frinring.files.wordpress.com/2008/12/okteta-02-new-features1.png
http://frinring.files.wordpress.com/2008/05/oktetastringextract.png


What do you think? Who of you works on these parts of KDevelop? For a start, 
where would I need to look to solve the Save/Revert problem?

Cheers
Friedrich
-- 
Okteta - KDE 4 Hex Editor - http://utils.kde.org/projects/okteta




More information about the KDevelop-devel mailing list