Re: [anjuta-devel] ianjuta_project_manager_get_elements



Hi Massimo,

Le 22/11/2010 21:45, Sébastien Granjoux a écrit :
I have just looked at the ianjuta_project_manager_get_elements function
to know why it returns 0. It's because, the project is loaded in a thread.
>
Then I don't what is the best solution to fix this.
...

Well after looking at this, I think there is no need to change the project manager to make it works. The project-loaded should already works.

The symbol are loaded 2 times with the new project manager because there are two times the code in on_project_root_added and in on_project_loaded. Probably the old project manager wasn't emitting project-loaded.

So, I think the best fix for the moment is to remove the code in on_project_root_added.

/*
 * we need an initial import
 */
if (needs_sources_scan == TRUE)
{
        DEBUG_PRINT ("Importing sources.");
        do_import_project_sources (ANJUTA_PLUGIN_SYMBOL_DB(plugin), pm, root_dir);
}
else    
{
        ...
}


Then adding an argument complete to the project-loaded signal could be nice to allow the symbol-db plugin to start doing something before the project is fully loaded. But it's just an optimization, I think it's better to see this later.

Regards,

Sébastien



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