Re: [anjuta-devel] New project interface and introspection
- From: Sébastien Granjoux <seb sfo free fr>
- To: Abderrahim Kitouni <a kitouni gmail com>
- Cc: anjuta-devel-list gnome org
- Subject: Re: [anjuta-devel] New project interface and introspection
- Date: Thu, 21 Oct 2010 19:58:25 +0200
Hi,
I have started to change the current code to implement the new interface
and I have some new ideas.
I think it would be better to use signals instead of callbacks to report
that the project is loaded.The advantage is that we could remove later
most of the IAnjutaProjectManager interface.
All plugins can use directly the IAnjutaProject interface while the
project manager plugin works only as a view. The project manager connect
on loaded/saved/modified signals and update the project view as needed.
Currently, all plugins have to call the load function in
IAnjutaProjectManager interface. Then the project manager calls the load
function in IAnjutaProject interface and update the project view when
the load is completed. If we have a loaded signal, we don't have to do
it through the IAnjutaProjectManager interface.
I think we need the following signals in IAnjutaProject
void ::node_updated (AnjutaProjectNode *node);
Emitted when a node is changed on disk. The project manager needs to
connect on this signal and call ianjuta_project_load_node.
void ::node_changed (AnjutaProjectNode *node);
Emitted when a node is changed with ianjuta_project_add_node_after,
ianjuta_project_add_node_before, ianjuta_project_remove_node,
ianjuta_project_set_property, ianjuta_project_remove_property. The
project manager needs to connect on this signal to update the project
view. In addition, perhaps it can automatically call
ianjuta_project_save_node.
void ::node_loaded (AnjutaProjectNode *node)
Emitted when a node is loaded. The project manager needs to connect on
this to update the project view. Moreover, the load function can load
the project only partially, so the project manager needs to check all
loaded node and call ianjuta_project_load_node if some nodes do not have
all their children loaded (or it can wait until the children are really
needed).
void ::node_saved (AnjutaProjectNode *node)
Emitted when a node is saved. I think it's useless for the project manager.
This new proposal will change only the ianjuta_project_load_node and
ianjuta_project_save_node function in the IAnjutaProject interface. I
prefer to keep the current IAnjutaProjectManager interface for the moment.
After merging the newproject branch into master and checking that it's
working, I think it would be useful to simplify the project manager
interface and allow plugins to use the project interface directly.
Note, that the IAnjutaProject interface is more low level than the
IAnjutaProjectManager interface.
- The add node function doesn't save the project automatically.
- The load function can load the project only partially.
As I have described above, I think both issues can be fixed in a project
manager plugin.
As I have removed the thread used to load the project, I have seen that
loading the project doesn't take so much time. On Anjuta it is something
like 2-3s on the 28s needed here to start. The new backend is a bit
faster, 20% but you don't feel it.
Sorry for this long mail again with new changes:). I think it goes in
the right direction for you but what do you think ?
Regards,
Sébastien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]