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

Unified Diff: sdk/lib/_internal/dartdoc/lib/dartdoc.dart

Issue 11364134: Merge libv1. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Reupload due to error Created 8 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/dartdoc/lib/dartdoc.dart
diff --git a/sdk/lib/_internal/dartdoc/lib/dartdoc.dart b/sdk/lib/_internal/dartdoc/lib/dartdoc.dart
index a4a2a63d36f3eafc43640e6c9c0bce2a7aca26b6..fb116a165a13058fdeddb93d062690f32a16104a 100644
--- a/sdk/lib/_internal/dartdoc/lib/dartdoc.dart
+++ b/sdk/lib/_internal/dartdoc/lib/dartdoc.dart
@@ -21,10 +21,9 @@ import 'dart:math';
import 'dart:uri';
import 'dart:json';
-// TODO(rnystrom): Use "package:" URL (#4968).
-import 'mirrors.dart';
-import 'mirrors_util.dart';
-import 'src/mirrors/dart2js_mirror.dart' as dart2js;
+import '../../compiler/implementation/mirrors/mirrors.dart';
+import '../../compiler/implementation/mirrors/mirrors_util.dart';
+import '../../compiler/implementation/mirrors/dart2js_mirror.dart' as dart2js;
import 'classify.dart';
import 'markdown.dart' as md;
import '../../compiler/implementation/scanner/scannerlib.dart' as dart2js;
@@ -75,7 +74,7 @@ Path get scriptDir =>
void cleanOutputDirectory(Path path) {
final outputDir = new Directory.fromPath(path);
if (outputDir.existsSync()) {
- outputDir.deleteRecursivelySync();
+ outputDir.deleteSync(recursive: true);
}
try {
@@ -128,7 +127,7 @@ Future copyDirectory(Path from, Path to) {
Future<bool> compileScript(int mode, Path outputDir, Path libPath) {
var clientScript = (mode == MODE_STATIC) ? 'static' : 'live-nav';
var dartPath = libPath.append(
- '_internal/dartdoc/lib/src/client/client-$clientScript.dart');
+ 'lib/_internal/dartdoc/lib/src/client/client-$clientScript.dart');
var jsPath = outputDir.append('client-$clientScript.js');
var completer = new Completer<bool>();
@@ -564,7 +563,7 @@ class Dartdoc {
void cleanup() {
final dir = new Directory.fromPath(tmpPath);
if (dir.existsSync()) {
- dir.deleteRecursivelySync();
+ dir.deleteSync(recursive: true);
}
}
@@ -895,6 +894,9 @@ class Dartdoc {
listTypes(types, header) {
if (types == null) return;
+ // Filter out injected types. (JavaScriptIndexingBehavior)
+ types = new List.from(types.filter((t) => t.library != null));
+
var publicTypes;
if (showPrivate) {
publicTypes = types;
@@ -1538,7 +1540,9 @@ class Dartdoc {
if (type is LibraryMirror) {
return '${sanitize(type.simpleName)}.html';
}
- assert (type is TypeMirror);
+ if (type.library == null) {
+ return '';
+ }
// Always get the generic type to strip off any type parameters or
// arguments. If the type isn't generic, genericType returns `this`, so it
// works for non-generic types too.
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/util/uri_extras.dart ('k') | sdk/lib/_internal/dartdoc/lib/mirrors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698