[RFC] Context-Menu Handling in KDevelop4

Andreas Pakulat apaku at gmx.de
Tue Apr 3 19:15:36 UTC 2007


Hi, 

so I finally came around to ask Adam what he meant with the comment on
KDevelop::MainWindow::fillContextMenu().

His response was:
,----
| Well, kdevelop has this notion of global context's such as 'file context'
| 
| If a plugin wished to add an action to the context menu shown whenever a file
| is selected it would just call:
| 
|         'KActionCollection *ICore::actionCollection(ICore::FileContext)'
| 
| or something and retrieve the action collection for that context as denoted by
| some enum.  The plugin could then plug it's actions into it or something.
| 
| Hadn't really thought it out.
`----

As can be seen this is just an idea atm, so comments, thoughts, 
specifications for this are welcome. 

Also I'd like to discuss wether we should follow this idea or do it the
same way as in KDevelop3, where each plugin could provide a
fillContextMenu member function.

Personally I think the actionCollection way is cleaner and we don't have
to iterate over all plugins asking them for additions to the context
menu.

Andreas

-- 
You may get an opportunity for advancement today.  Watch it!




More information about the KDevelop-devel mailing list