xiaoding721
2023-11-13 e4edcfd0b987b239526f5375881b919789782dad
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
Quintiq file version 2.0
#parent: #root
Method PTF_GetActionAndParameters (
  String actionstring,
  output structured[String] parameters_o
) as String id:Method_LibPTF_dlgCreateEditTestScript_PTF_GetActionAndParameters
{
  #keys: '[103546.0.109837022]'
  Body:
  [*
    // Separates the action and the parameters
    // Get the action
    words  := actionstring.Tokenize( ' ' );
    action := words.Element( 0 );
    
    // Get the parameters from the statement
    parameterstring := actionstring.RestString( action.Length() ).TrimBoth();
    
    // Separate the parameters
    separator  := this.PTF_GetParameterSeparator();
    parameters := parameterstring.Tokenize( separator );
    
    // Trimming each of the parameters for the actual value
    parameters_o := construct( Strings );
    
    traverse( parameters, Elements, param )
    {
      if( param.TrimBoth().Length() > 0 )
      {
        parameters_o.Add( param.TrimBoth() );
      }
    }
    
    return action;
  *]
}