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

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

Issue 245673002: pkg/docgen: a bunch of cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase 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
« no previous file with comments | « pkg/docgen/lib/src/models/library.dart ('k') | pkg/docgen/lib/src/models/model_helpers.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 library docgen.models.method; 5 library docgen.models.method;
6 6
7 import 'package:markdown/markdown.dart' as markdown; 7 import 'package:markdown/markdown.dart' as markdown;
8 8
9 import '../exports/mirrors_util.dart' as dart2js_util; 9 import '../exports/mirrors_util.dart' as dart2js_util;
10 import '../exports/source_mirrors.dart'; 10 import '../exports/source_mirrors.dart';
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 String get docName { 85 String get docName {
86 if (mirror.isConstructor) { 86 if (mirror.isConstructor) {
87 // We name constructors specially -- including the class name again and a 87 // We name constructors specially -- including the class name again and a
88 // "-" to separate the constructor from its name (if any). 88 // "-" to separate the constructor from its name (if any).
89 return '${owner.docName}.${dart2js_util.nameOf(mirror.owner)}-' 89 return '${owner.docName}.${dart2js_util.nameOf(mirror.owner)}-'
90 '${dart2js_util.nameOf(mirror)}'; 90 '${dart2js_util.nameOf(mirror)}';
91 } 91 }
92 return super.docName; 92 return super.docName;
93 } 93 }
94 94
95 String get fileName => packagePrefix + docName; 95 String get qualifiedName => packagePrefix + docName;
96 96
97 /// Makes sure that the method with an inherited equivalent have comments. 97 /// Makes sure that the method with an inherited equivalent have comments.
98 void ensureCommentFor(Method inheritedMethod) { 98 void ensureCommentFor(Method inheritedMethod) {
99 if (comment.isNotEmpty) return; 99 if (comment.isNotEmpty) return;
100 100
101 comment = inheritedMethod.commentToHtml(this); 101 comment = inheritedMethod.commentToHtml(this);
102 unresolvedComment = inheritedMethod.unresolvedComment; 102 unresolvedComment = inheritedMethod.unresolvedComment;
103 commentInheritedFrom = inheritedMethod.commentInheritedFrom == '' ? 103 commentInheritedFrom = inheritedMethod.commentInheritedFrom == '' ?
104 new DummyMirror(inheritedMethod.mirror).docName : 104 new DummyMirror(inheritedMethod.mirror).docName :
105 inheritedMethod.commentInheritedFrom; 105 inheritedMethod.commentInheritedFrom;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 linkResolver: fixReference, inlineSyntaxes: MARKDOWN_SYNTAXES); 147 linkResolver: fixReference, inlineSyntaxes: MARKDOWN_SYNTAXES);
148 commentInheritedFrom = comment != '' ? 148 commentInheritedFrom = comment != '' ?
149 methodInheritedFrom.commentInheritedFrom : ''; 149 methodInheritedFrom.commentInheritedFrom : '';
150 result = comment; 150 result = comment;
151 } 151 }
152 return result; 152 return result;
153 } 153 }
154 154
155 bool isValidMirror(DeclarationMirror mirror) => mirror is MethodMirror; 155 bool isValidMirror(DeclarationMirror mirror) => mirror is MethodMirror;
156 } 156 }
OLDNEW
« no previous file with comments | « pkg/docgen/lib/src/models/library.dart ('k') | pkg/docgen/lib/src/models/model_helpers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698