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

Unified Diff: pkg/docgen/lib/src/library_helpers.dart

Issue 303153002: "Reverting 36776" (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/docgen/lib/src/generator.dart ('k') | pkg/docgen/lib/src/models/library.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/docgen/lib/src/library_helpers.dart
diff --git a/pkg/docgen/lib/src/library_helpers.dart b/pkg/docgen/lib/src/library_helpers.dart
index 24e89d3f15cd22107ef8af1f821c0629dbc276b8..78db9e9fcf11d3875b2d68e3c0d4c2ccd2788fcc 100644
--- a/pkg/docgen/lib/src/library_helpers.dart
+++ b/pkg/docgen/lib/src/library_helpers.dart
@@ -46,7 +46,7 @@ final Logger logger = new Logger('Docgen');
/// The dart:core library, which contains all types that are always available
/// without import.
-Library coreLibrary;
+Library _coreLibrary;
/// Set of libraries declared in the SDK, so libraries that can be accessed
/// when running dart by default.
@@ -102,9 +102,9 @@ markdown.Node fixComplexReference(String name) {
String findElementInScopeWithPrefix(String name, String packagePrefix) {
var lookupFunc = determineLookupFunc(name);
// Look in the dart core library scope.
- var coreScope = coreLibrary == null ? null : lookupFunc(coreLibrary.mirror,
+ var coreScope = _coreLibrary == null ? null : lookupFunc(_coreLibrary.mirror,
name);
- if (coreScope != null) return packagePrefix + coreLibrary.docName;
+ if (coreScope != null) return packagePrefix + _coreLibrary.docName;
// If it's a reference that starts with a another library name, then it
// looks for a match of that library name in the other sdk libraries.
@@ -149,8 +149,8 @@ Indexable getDocgenObject(DeclarationMirror mirror, [Indexable owner]) {
if (owner != null) {
var firstSet = docgenObj[owner.docName];
if (firstSet != null) setToExamine.add(firstSet);
- if (coreLibrary != null && docgenObj[coreLibrary.docName] != null) {
- setToExamine.add(docgenObj[coreLibrary.docName]);
+ if (_coreLibrary != null && docgenObj[_coreLibrary.docName] != null) {
+ setToExamine.add(docgenObj[_coreLibrary.docName]);
}
} else {
setToExamine.addAll(docgenObj.values);
@@ -174,7 +174,7 @@ Indexable getDocgenObject(DeclarationMirror mirror, [Indexable owner]) {
void initializeTopLevelLibraries(MirrorSystem mirrorSystem) {
_sdkLibraries = mirrorSystem.libraries.values.where(
(each) => each.uri.scheme == 'dart');
- coreLibrary = new Library(_sdkLibraries.singleWhere((lib) =>
+ _coreLibrary = new Library(_sdkLibraries.singleWhere((lib) =>
lib.uri.toString().startsWith('dart:core')));
}
« no previous file with comments | « pkg/docgen/lib/src/generator.dart ('k') | pkg/docgen/lib/src/models/library.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698