Push or Pull for selections?

Andreas Pakulat apaku at gmx.de
Sun Aug 24 08:54:02 UTC 2008


Hi,

after comitting the proxy-selection-model last night I couldn't really
sleep and thought about how to allow plugins to know the selections in
other plugins. Or rather, they want to know the selections in the
toolviews and views.

Now I'm a bit undecided wether to use a push or a pull strategy to make
the information available. The push strategy would mean a new virtual on
IPlugin and a public method on IPluginController to notify all plugins
of changes in the selection. So each plugin interested in knowing the
"last" selection in the GUI would need to re-implement the virtual
method and then read the data about the selection (I was going to re-use
the Context class as it really already has all the needed data).

Pull would mean we provide access to the currently focused view/toolview
and have a "current selection" method there that retrieves a Context.
I'm not sure yet how to best map that to the toolview factory though,
but this might get easier if/when Alexander is finished with his
shell/sublime re-design.

Thoughts? Comments?

Andreas

-- 
Your love life will be happy and harmonious.




More information about the KDevelop-devel mailing list