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

Unified Diff: dart/site/try/src/compiler_isolate.dart

Issue 197923002: Mock up code completion. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r34309. Created 6 years, 9 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 | « dart/site/try/src/compilation.dart ('k') | dart/site/try/src/decoration.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/site/try/src/compiler_isolate.dart
diff --git a/dart/site/try/src/compiler_isolate.dart b/dart/site/try/src/compiler_isolate.dart
index 9366aac5697d79bf37805ca1c2726a2631139bb8..d9981b3914f69b16c8a3f6350cf5cb19c4bcede9 100644
--- a/dart/site/try/src/compiler_isolate.dart
+++ b/dart/site/try/src/compiler_isolate.dart
@@ -9,7 +9,9 @@ import 'dart:html';
import 'dart:isolate';
import 'dart:convert' show JSON;
-import '../../../sdk/lib/_internal/compiler/compiler.dart' as compiler;
+import 'compilation.dart' show PRIVATE_SCHEME;
+
+import 'package:compiler/compiler.dart' as compiler;
const bool THROW_ON_ERROR = false;
@@ -64,9 +66,11 @@ compile(source, SendPort replyTo) {
});
charactersRead += value.length;
return new Future.value(value);
- } else if ('$uri' == 'memory:/main.dart') {
+ } else if ('$uri' == '$PRIVATE_SCHEME:/main.dart') {
charactersRead += source.length;
return new Future.value(source);
+ } else if (uri.scheme == PRIVATE_SCHEME) {
+ return HttpRequest.getString('project${uri.path}');
}
throw new Exception('Error: Cannot read: $uri');
}
@@ -81,9 +85,9 @@ compile(source, SendPort replyTo) {
throw new Exception('Throw on error');
}
}
- compiler.compile(Uri.parse('memory:/main.dart'),
+ compiler.compile(Uri.parse('$PRIVATE_SCHEME:/main.dart'),
sdkLocation,
- null,
+ Uri.parse('packages/'),
inputProvider,
handler,
options).then((js) {
« no previous file with comments | « dart/site/try/src/compilation.dart ('k') | dart/site/try/src/decoration.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698