File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -178,11 +178,20 @@ class HtmlGeneratorInstance {
178178 void _generateJson () {
179179 File jsonFile = createOutputFile (out, 'index.json' );
180180 String json = JSON .encode (documentedElements.map ((ModelElement e) {
181- Map data = {'name' : e.name, 'href' : e.href};
181+ // TODO: find a better string for type
182+ Map data = {
183+ 'name' : e.name,
184+ 'href' : e.href,
185+ 'type' : e.runtimeType.toString ()
186+ };
182187 if (e is EnclosedElement ) {
183- data['enclosedElementName' ] =
184- (e as EnclosedElement ).enclosingElement.name;
188+ EnclosedElement ee = e as EnclosedElement ;
189+ data['enclosedBy' ] = {
190+ 'name' : ee.enclosingElement.name,
191+ 'type' : ee.enclosingElement.runtimeType.toString ()
192+ };
185193 }
194+ return data;
186195 }).toList ());
187196 jsonFile.writeAsStringSync (json);
188197 }
You can’t perform that action at this time.
0 commit comments