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

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

Issue 288033010: Add versioning information for packages and the SDK. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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/library_helpers.dart ('k') | pkg/docgen/lib/src/package_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.library; 5 library docgen.models.library;
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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 String get packagePrefix => packageName == null || packageName.isEmpty ? 136 String get packagePrefix => packageName == null || packageName.isEmpty ?
137 '' : '$packageName/'; 137 '' : '$packageName/';
138 138
139 Map get previewMap { 139 Map get previewMap {
140 var map = {'packageName': packageName}; 140 var map = {'packageName': packageName};
141 map.addAll(super.previewMap); 141 map.addAll(super.previewMap);
142 if (packageIntro != null) { 142 if (packageIntro != null) {
143 map['packageIntro'] = packageIntro; 143 map['packageIntro'] = packageIntro;
144 } 144 }
145 var version = packageVersion(mirror);
146 if (version != '' && version != null) map['version'] = version;
145 return map; 147 return map;
146 } 148 }
147 149
148 String get name => docName; 150 String get name => docName;
149 151
150 String get docName => getLibraryDocName(mirror); 152 String get docName => getLibraryDocName(mirror);
151 153
152 /// Generates a map describing the [Library] object. 154 /// Generates a map describing the [Library] object.
153 Map toMap() => { 155 Map toMap() => {
154 'name': name, 156 'name': name,
(...skipping 26 matching lines...) Expand all
181 bool get isPrivate => false; 183 bool get isPrivate => false;
182 184
183 Indexable get owner => null; 185 Indexable get owner => null;
184 186
185 // This is a known incomplete implementation of Indexable 187 // This is a known incomplete implementation of Indexable
186 // overriding noSuchMethod to remove static warnings 188 // overriding noSuchMethod to remove static warnings
187 noSuchMethod(Invocation invocation) { 189 noSuchMethod(Invocation invocation) {
188 throw new UnimplementedError(invocation.memberName.toString()); 190 throw new UnimplementedError(invocation.memberName.toString());
189 } 191 }
190 } 192 }
OLDNEW
« no previous file with comments | « pkg/docgen/lib/src/library_helpers.dart ('k') | pkg/docgen/lib/src/package_helpers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698