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

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

Issue 1033473002: Anchor and create a link near Notifications and Requests definitions in the Analysis Server Spec (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 months 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 | Annotate | Revision Log
« no previous file with comments | « pkg/analysis_server/doc/api.html ('k') | no next file » | 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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 }); 300 });
301 dl(() { 301 dl(() {
302 domain.notifications.forEach(visitNotification); 302 domain.notifications.forEach(visitNotification);
303 }); 303 });
304 } 304 }
305 } 305 }
306 306
307 @override 307 @override
308 void visitNotification(Notification notification) { 308 void visitNotification(Notification notification) {
309 dt('notification', () { 309 dt('notification', () {
310 write(notification.longEvent); 310 anchor('notification_${notification.longEvent}', () {
311 write(notification.longEvent);
312 });
313 write(' (');
314 link('notification_${notification.longEvent}', () {
315 write('#');
316 });
317 write(')');
311 }); 318 });
312 dd(() { 319 dd(() {
313 box(() { 320 box(() {
314 showType( 321 showType(
315 'notification', notification.notificationType, notification.params); 322 'notification', notification.notificationType, notification.params);
316 }); 323 });
317 translateHtml(notification.html); 324 translateHtml(notification.html);
318 describePayload(notification.params, 'Parameters'); 325 describePayload(notification.params, 'Parameters');
319 }); 326 });
320 } 327 }
(...skipping 13 matching lines...) Expand all
334 void visitRefactorings(Refactorings refactorings) { 341 void visitRefactorings(Refactorings refactorings) {
335 translateHtml(refactorings.html); 342 translateHtml(refactorings.html);
336 dl(() { 343 dl(() {
337 super.visitRefactorings(refactorings); 344 super.visitRefactorings(refactorings);
338 }); 345 });
339 } 346 }
340 347
341 @override 348 @override
342 void visitRequest(Request request) { 349 void visitRequest(Request request) {
343 dt('request', () { 350 dt('request', () {
344 write(request.longMethod); 351 anchor('request_${request.longMethod}', () {
352 write(request.longMethod);
353 });
354 write(' (');
355 link('request_${request.longMethod}', () {
356 write('#');
357 });
358 write(')');
345 }); 359 });
346 dd(() { 360 dd(() {
347 box(() { 361 box(() {
348 showType('request', request.requestType, request.params); 362 showType('request', request.requestType, request.params);
349 br(); 363 br();
350 showType('response', request.responseType, request.result); 364 showType('response', request.responseType, request.result);
351 }); 365 });
352 translateHtml(request.html); 366 translateHtml(request.html);
353 describePayload(request.params, 'Parameters'); 367 describePayload(request.params, 'Parameters');
354 describePayload(request.result, 'Returns'); 368 describePayload(request.result, 'Returns');
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 bool verticalBarNeeded = false; 582 bool verticalBarNeeded = false;
569 for (TypeDecl choice in typeUnion.choices) { 583 for (TypeDecl choice in typeUnion.choices) {
570 if (verticalBarNeeded) { 584 if (verticalBarNeeded) {
571 write(' | '); 585 write(' | ');
572 } 586 }
573 visitTypeDecl(choice); 587 visitTypeDecl(choice);
574 verticalBarNeeded = true; 588 verticalBarNeeded = true;
575 } 589 }
576 } 590 }
577 } 591 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/doc/api.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698