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

Andreas Pakulat apaku at gmx.de
Tue Aug 4 12:54:15 UTC 2009


On 04.08.09 14:35:20, Friedrich W. H. Kossebau wrote:
> 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.

Groups are a supported feature of xmlgui and allows us to keep control over
where exactly actions from loaded kparts are shown in the menu. IMHO kparts
not using groups are just broken, even ui_standard.rc supports groups as
far as I understand (with those MergeLocal name="...." stuff) and thats
where most of our group names from from.

> 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 :)

We don't support read/write parts currently, thats all. PartDocument would
need to be extended to support both read/write as well as read-only parts.

> Feature: Embedded tool views
> ----------------------------
> How to support tools which have a small control/tool view that is embedded and 
> not a dialog?

You'll need to leave the kparts approach and write a kdevelop plugin to do
this. There's no way to have kparts create toolviews. As a start look at
the designer plugin in playground/devtools/kdevelop4-extra-plugin. It tries
to integrate Qt designer into kdevelop by providing a custom document type
and toolviews that interact with each other.

> Feature: Statusbar items
> ------------------------
> Could there be an option to show statusbar items like the KPart has for 
> row/column?

Same as the one above, with a kdevelop plugin this will just work.

> 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?

kdevplatform/shell/partdocument.cpp.

Andreas
 
-- 
"Life, loathe it or ignore it, you can't like it."
		-- Marvin, "Hitchhiker's Guide to the Galaxy"




More information about the KDevelop-devel mailing list