Re: [anjuta-devel] New project interface and introspection



Hello,

Le 21/10/2010 23:14, Abderrahim Kitouni a écrit :
        void ::node_updated (AnjutaProjectNode *node);
Emitted when a node is changed on disk.
This means that the project backend needs to monitor its files, Right?
If so, it needs to be documented clearly.

Yes, I think it's better that a project backend monitors its files. It's already done in all backend currently. It cannot be done outside because only the project backend knows which files are used.

Currently, I even use this signal to refresh the project tree view. When you add a new node in the project, Anjuta saves the project and this trigger this signal that is used to refresh the tree view.

If we allow backend with this signal, the project manager needs to refresh the tree view using the node_changed signal. I don't know if it's useful.


        void ::node_changed (AnjutaProjectNode *node);
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.
I think it should call it automatically. The project isn't something
that changes very often.

Ok I think it's better that the project is saved automatically too.

If a plugin tries to access a node, it needs to make sure
it's loaded first (or use the package manager which should take care of
this).

Yes, I need to add a flag in the node state telling if the node is already loaded. It's a bit annoying to use but I don't really see a better solution.

Emitted when a node is saved. I think it's useless for the project manager.
It may be useless for now, but I think it's better to include it just in
case.

Ok, I have the same idea.


Do you mean that the current implementation doesn't use threads at all?
I think it's better this way if it isn't significantly slower.

I think I will commit the autotools backend without using a thread. But then the code is already written so I think I will use thread in a following commit, as it's still nice to avoid blocking the GUI. Since I wrote that mail, I have seen that the work is rather to remove the thread in the project manager.


Yes, it goes in the right direction :-) The other mail seems also fine.
Now, I'd like to start experimenting with writing random project
plugin ;-).

Ok, fine. I will try to implement this new interface (with signal instead of callback) inside the newproject branch. So you should be able to write new backend here I hope next week.

Then, I will try to change the master branch in several step:
1. Use the new IAnjutaProjectManager interface, probably keeping ianjuta_project_manager_get_package to make this easier. It should be easy. 2. Use the new IAnjutaProject interface, this is the difficult part as it needs to change the project manager plugin (normally taking the code from the newproject branch) and update the Gbf autotools plugin.
3. Update the directory plugin should be quite simple.
4. Update the auto tools plugin should be to difficult because the code should exist in the newproject branch at that time.



Which reminds me of a thing : Anjuta cannot import projects
for which there is no project template, I don't like this limitation,
and I don't think it's too much trouble to fix, is it?

What do you mean by project template ? For me the project templates are in the project wizard but I don't think it's linked to the import function.


(we may need to
add a new entry to the project plugin description that tells which
builder to use, but that's about it, right? (or should I file a bug in
bugzilla for this?)

I don't really understand the issue, but if we just need to add some new key, it looks fine for me. The filling a bug is always a bit better.


And btw, as a user of the project manager, I think this is a good time
to use it correctly instead of just porting to the new API (or should
this just wait for the next cycle?).

Do you mean changing the project manager interface to use AnjutaProjectNode ? If yes, I'm afraid it will wait for the next cycle, if I can already add the backend in this cycle I will be quite happy. Anyway, if there is some time left that's fine for me.


Regards,

Sébastien



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]