Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: pkg/analysis_server/tool/spec/to_html.dart

Issue 1416093007: Experimental `getDiagnostics` request (#24480). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Review fixes. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/analysis_server/tool/spec/spec_input.html ('k') | pkg/analyzer/lib/src/codegen/tools.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * Code for displaying the API as HTML. This is used both for generating a 6 * Code for displaying the API as HTML. This is used both for generating a
7 * full description of the API as a web page, and for generating doc comments 7 * full description of the API as a web page, and for generating doc comments
8 * in generated code. 8 * in generated code.
9 */ 9 */
10 library to.html; 10 library to.html;
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 } 381 }
382 } else if (node is dom.Text) { 382 } else if (node is dom.Text) {
383 String text = node.text; 383 String text = node.text;
384 write(text); 384 write(text);
385 } 385 }
386 } 386 }
387 } 387 }
388 388
389 @override 389 @override
390 void visitApi() { 390 void visitApi() {
391 definedTypes = api.types.keys.toSet(); 391 Iterable<TypeDefinition> apiTypes =
392 api.types.where((TypeDefinition td) => !td.experimental);
393 definedTypes = apiTypes.map((TypeDefinition td) => td.name).toSet();
392 394
393 html(() { 395 html(() {
394 translateHtml(api.html); 396 translateHtml(api.html);
395 }); 397 });
396 } 398 }
397 399
398 @override 400 @override
399 void visitDomain(Domain domain) { 401 void visitDomain(Domain domain) {
400 if (domain.experimental) { 402 if (domain.experimental) {
401 return; 403 return;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 showType('response', request.responseType, request.result); 486 showType('response', request.responseType, request.result);
485 }); 487 });
486 translateHtml(request.html); 488 translateHtml(request.html);
487 describePayload(request.params, 'Parameters'); 489 describePayload(request.params, 'Parameters');
488 describePayload(request.result, 'Returns'); 490 describePayload(request.result, 'Returns');
489 }); 491 });
490 } 492 }
491 493
492 @override 494 @override
493 void visitTypeDefinition(TypeDefinition typeDefinition) { 495 void visitTypeDefinition(TypeDefinition typeDefinition) {
496 if (typeDefinition.experimental) {
497 return;
498 }
494 dt('typeDefinition', () { 499 dt('typeDefinition', () {
495 anchor('type_${typeDefinition.name}', () { 500 anchor('type_${typeDefinition.name}', () {
496 write('${typeDefinition.name}: '); 501 write('${typeDefinition.name}: ');
497 TypeVisitor typeVisitor = new TypeVisitor(api, short: true); 502 TypeVisitor typeVisitor = new TypeVisitor(api, short: true);
498 addAll(typeVisitor.collectHtml(() { 503 addAll(typeVisitor.collectHtml(() {
499 typeVisitor.visitTypeDecl(typeDefinition.type); 504 typeVisitor.visitTypeDecl(typeDefinition.type);
500 })); 505 }));
501 }); 506 });
502 }); 507 });
503 dd(() { 508 dd(() {
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 bool verticalBarNeeded = false; 707 bool verticalBarNeeded = false;
703 for (TypeDecl choice in typeUnion.choices) { 708 for (TypeDecl choice in typeUnion.choices) {
704 if (verticalBarNeeded) { 709 if (verticalBarNeeded) {
705 write(' | '); 710 write(' | ');
706 } 711 }
707 visitTypeDecl(choice); 712 visitTypeDecl(choice);
708 verticalBarNeeded = true; 713 verticalBarNeeded = true;
709 } 714 }
710 } 715 }
711 } 716 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/tool/spec/spec_input.html ('k') | pkg/analyzer/lib/src/codegen/tools.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698