@@ -51,10 +51,11 @@ component output="false" displayname="import" {
51
51
for ( j = 1 ; j <= ArrayLen ( currenttag .parameter ); j ++ ) {
52
52
paramname = currenttag .parameter [j ].XmlAttributes .name ;
53
53
newtag .completions .add ( paramname );
54
- if ( currenttag .parameter [j ].XmlAttributes .type == " Boolean" ||
55
- ( StructKeyExists ( currenttag .parameter [j ], " values" ) && StructKeyExists ( currenttag .parameter [j ].values , " value" ) ) ) {
56
- newattribute = Duplicate ( this .newattributetemplate );
57
- newattribute .name = currenttag .parameter [j ].XmlAttributes .name ;
54
+ newattribute = Duplicate ( this .newattributetemplate );
55
+ newattribute .name = currenttag .parameter [j ].XmlAttributes .name ;
56
+ if ( StructKeyExists ( currenttag .parameter [j ].XmlAttributes , " type" ) && ( currenttag .parameter [j ].XmlAttributes .type == " Boolean" ||
57
+ ( StructKeyExists ( currenttag .parameter [j ], " values" ) && StructKeyExists ( currenttag .parameter [j ].values , " value" ) ) ) ) {
58
+
58
59
switch ( currenttag .parameter [j ].XmlAttributes .type ) {
59
60
case " Boolean" :
60
61
newattribute .completions .add ( " true" );
@@ -68,8 +69,9 @@ component output="false" displayname="import" {
68
69
}
69
70
break ;
70
71
}
71
- newtag . attributes [ newattribute . name ] = newattribute ;
72
+
72
73
}
74
+ newtag .attributes [newattribute .name ] = newattribute ;
73
75
/*
74
76
if ( StructKeyExists( currenttag.parameter[j].XmlAttributes, "required" ) && currenttag.parameter[j].XmlAttributes.required EQ "true" ) {
75
77
@@ -91,10 +93,12 @@ component output="false" displayname="import" {
91
93
var attrCompIterator = " " ;
92
94
var attrComp = " " ;
93
95
var crlf = chr ( 13 ) & chr ( 10 );
96
+ var attrIterator = " " ;
97
+ var attr = " " ;
94
98
95
99
while ( tagIterator .hasNext () ) {
96
100
tag = tagIterator .next ();
97
- pythonoutput & = " '" & tag .name & " ': {" & crlf ;
101
+ pythonoutput & = " self.completions[ '" & tag .name & " '] = {" & crlf ;
98
102
compIter = tag .completions .iterator ();
99
103
pythonoutput & = " 'completions': [" & crlf ;
100
104
while ( compIter .hasNext () ) {
@@ -113,11 +117,18 @@ component output="false" displayname="import" {
113
117
}
114
118
pythonoutput & = crlf ;
115
119
}
116
- pythonoutput & = " ]" & crlf ;
117
- pythonoutput & = " }" ;
118
- if ( tagIterator .hasNext () ) {
119
- pythonoutput & = " ," & crlf ;
120
+ pythonoutput & = " ]," & crlf ;
121
+ attrIterator = StructKeyArray (tag .attributes ).iterator ();
122
+ pythonoutput & = " 'attributes': [" ;
123
+ while ( attrIterator .hasNext () ) {
124
+ attr = attrIterator .next ();
125
+ pythonoutput & = crlf & ' "' & attr & ' "' ;
126
+ if ( attrIterator .hasNext () ) {
127
+ pythonoutput & = " ," ;
128
+ }
120
129
}
130
+ pythonoutput & = crlf & " ]" & crlf ;
131
+ pythonoutput & = " }" & crlf ;
121
132
}
122
133
return pythonoutput ;
123
134
}
0 commit comments