Quintiq file version 2.0
#parent: #root
Method ParseComponents (TG_UIComponent tg_component, GUIComponent component) id:Method_GlobalStateTestGenerator_ParseComponents
{
  #keys: '[142876.9.493944499]'
  Body:
  [*
    cd := select( ApplicationScope.Project().ComponentRegistry().GetAllComponents(),
                  Elements,
                  mcd,
                  mcd.Name() = tg_component.Name() );
    
    if( not isnull( cd ) )
    {
      traverse( cd.Responses(), Responses, response )
      {
        impl := response.Implementation().astype( ModeledResponseQuillImplementation );
        menutext := '';
        menuopensdialog := false;
        dialogdatabinding := '';
        
        if( response.ResponseType() = 'OnClick (Menu)' )
        {
          GlobalStateTestGenerator.GetFormMenuProperties( tg_component.TG_UIForm().Name(),
                                                          response.Initiator(),
                                                          menutext );
          
          GlobalStateTestGenerator.ResponseOpensDialog( impl, menuopensdialog, dialogdatabinding );
        }
        
        tg_response := TG_UIResponse::FindOrCreate( tg_component,
                                                    response.Key(),
                                                    response.Identifier(),
                                                    impl.Body(),
                                                    impl.Precondition(),
                                                    response.ResponseType(),
                                                    response.Enabled(),
                                                    menutext,
                                                    menuopensdialog,
                                                    dialogdatabinding );
        
        traverse( response.Arguments(), Arguments, argument )
        {
          TG_UIResponseArgument::FindOrCreate( tg_response,
                                               argument.Key(),
                                               argument.Name(),
                                               argument.ArgumentType(),
                                               argument.IsBinding() );
        }
      }
    }
  *]
}
