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

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

Issue 268583002: Access parameter data in Annotations, as well as fixed export visibility (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 side-by-side diff with in-line comments
Download patch
Index: pkg/docgen/lib/src/generator.dart
diff --git a/pkg/docgen/lib/src/generator.dart b/pkg/docgen/lib/src/generator.dart
index 9778b519565d04de62f1e56983bc099a02735531..aba05514e1376b6bf71c8a944fd8ac1621624250 100644
--- a/pkg/docgen/lib/src/generator.dart
+++ b/pkg/docgen/lib/src/generator.dart
@@ -41,12 +41,10 @@ String _outputDirectory;
List<String> _excluded;
/// The path of the pub script.
-String get pubScript => _pubScript;
-String _pubScript;
+String pubScript;
/// The path of Dart binary.
-String get dartBinary => _dartBinary;
-String _dartBinary;
+String dartBinary;
/// Docgen constructor initializes the link resolver for markdown parsing.
/// Also initializes the command line arguments.
@@ -62,11 +60,11 @@ Future<bool> generateDocumentation(List<String> files, {String packageRoot,
bool outputToYaml: true, bool includePrivate: false, bool includeSdk: false,
bool parseSdk: false, String introFileName: '',
out: DEFAULT_OUTPUT_DIRECTORY, List<String> excludeLibraries: const [], bool
- includeDependentPackages: false, String startPage, String dartBinary,
- String pubScript, bool indentJSON: false}) {
+ includeDependentPackages: false, String startPage, String dartBinaryValue,
+ String pubScriptValue, bool indentJSON: false}) {
_excluded = excludeLibraries;
- _pubScript = pubScript;
- _dartBinary = dartBinary;
+ dartBinary = dartBinaryValue;
+ pubScript = pubScriptValue;
logger.onRecord.listen((record) => print(record.message));
@@ -384,13 +382,13 @@ List<FileSystemEntity> _packageDirList(Directory dir) {
List<String> _allDependentPackageDirs(String packageDirectory) {
var packageName = packageNameFor(packageDirectory);
if (packageName == '') return [];
- var dependentsJson = Process.runSync(_pubScript, ['list-package-dirs'],
+ var dependentsJson = Process.runSync(pubScript, ['list-package-dirs'],
workingDirectory: packageDirectory, runInShell: true);
if (dependentsJson.exitCode != 0) {
print(dependentsJson.stderr);
}
var dependents = JSON.decode(dependentsJson.stdout)['packages'];
- return dependents.values.toList();
+ return dependents != null ? dependents.values.toList() : [];
}
/// For all the libraries, return a list of the libraries that are part of

Powered by Google App Engine
This is Rietveld 408576698