yanweiyuan3
2023-08-09 588bc7829387dfc761cc25f06f77d4c81818bd10
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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() );
        }
      }
    }
  *]
}