model_server/project/src/proj.h.cxx
// level = 0: from refresh all visited project
// level = 1: from refresh one level
// level = 2: from script for the whole tree
level = 0: from refresh all visited project
level = 1: from refresh one level
level = 2: from script for the whole tree
level = 0 : from refresh all visited project level = 1 : from refresh one level level = 2 : from script for the whole tree
void projNode::update_projects(int level)
{
    Initialize(projNode::update_projects);
    force_refresh(0);
    if (level == 1)
        return;
    symbolArr& proj_contents = rtl_contents();
    symbolPtr sym;
    ForEachS(sym, proj_contents)
    {
        if (sym.get_kind() == DD_PROJECT)
        {
            appPtr app_head = sym.get_def_app();
            if(app_head && is_projHeader(app_head))
            {
                projNode *child_proj = projNodePtr(app_head->get_root());
                if (child_proj && (child_proj->visited() && level == 0 || level == 2))
                    child_proj->update_projects(level);
            }
        }
    }
}
void projNode :: update_projects ( int level ) { Initialize ( projNode :: update_projects ) ; force_refresh ( 0 ) ; if ( level == 1 ) return ; symbolArr & proj_contents = rtl_contents ( ) ; symbolPtr sym ; ForEachS ( sym , proj_contents ) { if ( sym . get_kind ( ) == DD_PROJECT ) { appPtr app_head = sym . get_def_app ( ) ; if ( app_head && is_projHeader ( app_head ) ) { projNode * child_proj = projNodePtr ( app_head -> get_root ( ) ) ; if ( child_proj && ( child_proj -> visited ( ) && level == 0 || level == 2 ) ) child_proj -> update_projects ( level ) ; } } } }
level = 0: from refresh all visited project
level = 1: from refresh one level
level = 2: from script for the whole tree
level = 0 : from refresh all visited project level = 1 : from refresh one level level = 2 : from script for the whole tree