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

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

Issue 247973004: pkg/docgen: fix type warnings (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.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 29 matching lines...) Expand all
40 String get qualifiedName => packagePrefix + ownerPrefix + name; 40 String get qualifiedName => packagePrefix + ownerPrefix + name;
41 41
42 final TMirror mirror; 42 final TMirror mirror;
43 final bool isPrivate; 43 final bool isPrivate;
44 /// The comment text pre-resolution. We keep this around because inherited 44 /// The comment text pre-resolution. We keep this around because inherited
45 /// methods need to resolve links differently from the superclass. 45 /// methods need to resolve links differently from the superclass.
46 String unresolvedComment = ''; 46 String unresolvedComment = '';
47 47
48 Indexable(TMirror mirror) 48 Indexable(TMirror mirror)
49 : this.mirror = mirror, 49 : this.mirror = mirror,
50 this.isPrivate = isHidden(mirror) { 50 this.isPrivate = isHidden(mirror as DeclarationSourceMirror) {
51 51
52 var mirrorQualifiedName = dart2js_util.qualifiedNameOf(this.mirror); 52 var mirrorQualifiedName = dart2js_util.qualifiedNameOf(this.mirror);
53 53
54 var map = _mirrorToDocgen.putIfAbsent(mirrorQualifiedName, 54 var map = _mirrorToDocgen.putIfAbsent(mirrorQualifiedName,
55 () => new HashMap<String, Indexable>()); 55 () => new HashMap<String, Indexable>());
56 56
57 var added = false; 57 var added = false;
58 map.putIfAbsent(owner.docName, () { 58 map.putIfAbsent(owner.docName, () {
59 added = true; 59 added = true;
60 return this; 60 return this;
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 /// Why two levels of lookup? Speed, man. Speed. 207 /// Why two levels of lookup? Speed, man. Speed.
208 final Map<String, Map<String, Indexable>> _mirrorToDocgen = 208 final Map<String, Map<String, Indexable>> _mirrorToDocgen =
209 new HashMap<String, Map<String, Indexable>>(); 209 new HashMap<String, Map<String, Indexable>>();
210 210
211 Iterable<Indexable> get allIndexables => 211 Iterable<Indexable> get allIndexables =>
212 _mirrorToDocgen.values.expand((map) => map.values); 212 _mirrorToDocgen.values.expand((map) => map.values);
213 213
214 Map<String, Indexable> lookupIndexableMap(DeclarationMirror mirror) { 214 Map<String, Indexable> lookupIndexableMap(DeclarationMirror mirror) {
215 return _mirrorToDocgen[dart2js_util.qualifiedNameOf(mirror)]; 215 return _mirrorToDocgen[dart2js_util.qualifiedNameOf(mirror)];
216 } 216 }
OLDNEW
« no previous file with comments | « no previous file | pkg/docgen/lib/src/models/model_helpers.dart » ('j') | pkg/docgen/lib/src/models/model_helpers.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698