Re: [anjuta-devel] ianjuta_project_manager_get_elements



Hello,

Le 27 novembre 2010 14:53, Sébastien Granjoux <seb sfo free fr> a écrit :
Hi,

Le 27/11/2010 12:39, Abderrahim Kitouni a écrit :

The problem is that I don't have a reliable way to be sure that the
project is fully loaded, and I can't do anything useful before
everything is fully loaded.

What elements are you looking for ? sources files ? What's the problem if
you don't have all of them ?
I need all source files and all packages (actually, I need source files
and packages for current target, but I'm not doing it correctly now).

As you probably know, I'm using libvala for parsing vala files, and
although I can start parsing right when I get a file, I need to have
everything parsed before starting semantic analysis (btw, I have a patch
for using the new markers that Johannes implemented for showing the
errors found, I'll post everything once it's working).

It's probably a good time to implement it correctly : what I actually
need is all sources and all packages used from the current target. What
do you think is the best way to get this?

I think it's wrong to check if the returns value is null. You could have a
non null value with only a part of the project loaded. Currently with
autotools projects, you will NULL, everything except packages sources and
then all sources of every packages one by one but it depends on the
implementation and you cannot rely on it.
Yes, that's what I meant by "I prefer a more correct approach" :-) This
will work in most cases, but it's not the right thing to do.


There is a flag in each node which can tell you if the corresponding node is
only partially loaded. So if you have a pointer on such AnjutaProjectNode
object, you can know if the project is fully loaded or not. But you could
have to check all nodes moreover at the moment, I haven't change the
IAnjutaProjectManager interface so you don't have access to these
AnjutaProjectNode object at the moment.

Yes, but I still think that the project manager acts as a good
abstraction of the project api, it should probably be kept (having
access to the actual nodes may be useful, but isn't something most
plugins will want to do.





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