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

Side by Side Diff: pkg/docgen/lib/src/models.dart

Issue 237343002: pkg/docgen: sort output files (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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
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 library docgen.models; 5 library docgen.models;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 8
9 import 'package:markdown/markdown.dart' as markdown; 9 import 'package:markdown/markdown.dart' as markdown;
10 10
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 var contents = markdown.markdownToHtml(readme 390 var contents = markdown.markdownToHtml(readme
391 .readAsStringSync(), linkResolver: linkResolver, 391 .readAsStringSync(), linkResolver: linkResolver,
392 inlineSyntaxes: MARKDOWN_SYNTAXES); 392 inlineSyntaxes: MARKDOWN_SYNTAXES);
393 return contents; 393 return contents;
394 } 394 }
395 395
396 String get packagePrefix => packageName == null || packageName.isEmpty ? 396 String get packagePrefix => packageName == null || packageName.isEmpty ?
397 '' : '$packageName/'; 397 '' : '$packageName/';
398 398
399 Map get previewMap { 399 Map get previewMap {
400 var basic = super.previewMap; 400 var map = {'packageName': packageName};
401 basic['packageName'] = packageName; 401 map.addAll(super.previewMap);
402 if (packageIntro != null) { 402 if (packageIntro != null) {
403 basic['packageIntro'] = packageIntro; 403 map['packageIntro'] = packageIntro;
404 } 404 }
405 return basic; 405 return map;
406 } 406 }
407 407
408 String get name => docName; 408 String get name => docName;
409 409
410 String get docName { 410 String get docName {
411 return dart2js_util.qualifiedNameOf(mirror).replaceAll('.','-'); 411 return dart2js_util.qualifiedNameOf(mirror).replaceAll('.','-');
412 } 412 }
413 413
414 /// Checks if the given name is a key for any of the Class Maps. 414 /// Checks if the given name is a key for any of the Class Maps.
415 bool containsKey(String name) => 415 bool containsKey(String name) =>
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 .map((e) => originalMirror.getField(e.simpleName).reflectee) 1064 .map((e) => originalMirror.getField(e.simpleName).reflectee)
1065 .where((e) => e != null) 1065 .where((e) => e != null)
1066 .toList(); 1066 .toList();
1067 } 1067 }
1068 1068
1069 Map toMap() => { 1069 Map toMap() => {
1070 'name': getDocgenObject(mirror, owningLibrary).docName, 1070 'name': getDocgenObject(mirror, owningLibrary).docName,
1071 'parameters': parameters 1071 'parameters': parameters
1072 }; 1072 };
1073 } 1073 }
OLDNEW
« pkg/docgen/lib/src/generator.dart ('K') | « pkg/docgen/lib/src/model_helpers.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698