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

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

Issue 713863003: Generate docgen file names with hyphens in their names instead of colons (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix test Created 6 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 | Annotate | Revision Log
« no previous file with comments | « pkg/docgen/lib/src/generator.dart ('k') | pkg/docgen/test/inherited_comments_test.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.indexable; 5 library docgen.models.indexable;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:markdown/markdown.dart' as markdown; 9 import 'package:markdown/markdown.dart' as markdown;
10 10
(...skipping 21 matching lines...) Expand all
32 Library get owningLibrary => owner.owningLibrary; 32 Library get owningLibrary => owner.owningLibrary;
33 33
34 /// The reference to this element based on where it is printed as a 34 /// The reference to this element based on where it is printed as a
35 /// documentation file and also the unique URL to refer to this item. 35 /// documentation file and also the unique URL to refer to this item.
36 /// 36 ///
37 /// The qualified name (for URL purposes) and the file name are the same, 37 /// The qualified name (for URL purposes) and the file name are the same,
38 /// of the form packageName/ClassName or packageName/ClassName.methodName. 38 /// of the form packageName/ClassName or packageName/ClassName.methodName.
39 /// This defines both the URL and the directory structure. 39 /// This defines both the URL and the directory structure.
40 String get qualifiedName => packagePrefix + ownerPrefix + name; 40 String get qualifiedName => packagePrefix + ownerPrefix + name;
41 41
42 /// The name of the file we write this object's data into. The same as the
43 /// qualified name but with leading colons (i.e. dart:)
44 /// replaced by hyphens because of Windows.
45 String get fileName => qualifiedName.replaceFirst(":", "-");
46
42 final TMirror mirror; 47 final TMirror mirror;
43 final bool isPrivate; 48 final bool isPrivate;
44 /// The comment text pre-resolution. We keep this around because inherited 49 /// The comment text pre-resolution. We keep this around because inherited
45 /// methods need to resolve links differently from the superclass. 50 /// methods need to resolve links differently from the superclass.
46 String unresolvedComment = ''; 51 String unresolvedComment = '';
47 52
48 Indexable(TMirror mirror) 53 Indexable(TMirror mirror)
49 : this.mirror = mirror, 54 : this.mirror = mirror,
50 this.isPrivate = isHidden(mirror as DeclarationSourceMirror) { 55 this.isPrivate = isHidden(mirror as DeclarationSourceMirror) {
51 56
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 /// Why two levels of lookup? Speed, man. Speed. 212 /// Why two levels of lookup? Speed, man. Speed.
208 final Map<String, Map<String, Indexable>> _mirrorToDocgen = 213 final Map<String, Map<String, Indexable>> _mirrorToDocgen =
209 new HashMap<String, Map<String, Indexable>>(); 214 new HashMap<String, Map<String, Indexable>>();
210 215
211 Iterable<Indexable> get allIndexables => 216 Iterable<Indexable> get allIndexables =>
212 _mirrorToDocgen.values.expand((map) => map.values); 217 _mirrorToDocgen.values.expand((map) => map.values);
213 218
214 Map<String, Indexable> lookupIndexableMap(DeclarationMirror mirror) { 219 Map<String, Indexable> lookupIndexableMap(DeclarationMirror mirror) {
215 return _mirrorToDocgen[dart2js_util.qualifiedNameOf(mirror)]; 220 return _mirrorToDocgen[dart2js_util.qualifiedNameOf(mirror)];
216 } 221 }
OLDNEW
« no previous file with comments | « pkg/docgen/lib/src/generator.dart ('k') | pkg/docgen/test/inherited_comments_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698