OLD | NEW |
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 trydart.interaction_manager; | 5 library trydart.interaction_manager; |
6 | 6 |
7 import 'dart:html'; | 7 import 'dart:html'; |
8 | 8 |
9 import 'dart:convert' show | 9 import 'dart:convert' show |
10 JSON; | 10 JSON; |
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 context.compilerConsole = new SpanElement() | 755 context.compilerConsole = new SpanElement() |
756 ..append(progress) | 756 ..append(progress) |
757 ..appendText('\n'); | 757 ..appendText('\n'); |
758 context.shouldClearConsole = true; | 758 context.shouldClearConsole = true; |
759 context.elapsedCompilationTime | 759 context.elapsedCompilationTime |
760 ..start() | 760 ..start() |
761 ..reset(); | 761 ..reset(); |
762 if (context.isFirstCompile) { | 762 if (context.isFirstCompile) { |
763 outputDiv.append(context.compilerConsole); | 763 outputDiv.append(context.compilerConsole); |
764 } | 764 } |
| 765 var diagnostics = mainEditorPane.querySelectorAll('a.diagnostic'); |
765 context.oldDiagnostics | 766 context.oldDiagnostics |
766 ..clear() | 767 ..clear() |
767 ..addAll(mainEditorPane.querySelectorAll('a.diagnostic')); | 768 ..addAll(diagnostics); |
768 } | 769 } |
769 | 770 |
770 void aboutToRun() { | 771 void aboutToRun() { |
771 context.shouldClearConsole = true; | 772 context.shouldClearConsole = true; |
772 } | 773 } |
773 | 774 |
774 void onIframeError(ErrorMessage message) { | 775 void onIframeError(ErrorMessage message) { |
775 // TODO(ahe): Consider replacing object URLs with something like <a | 776 // TODO(ahe): Consider replacing object URLs with something like <a |
776 // href='...'>out.js</a>. | 777 // href='...'>out.js</a>. |
777 // TODO(ahe): Use source maps to translate stack traces. | 778 // TODO(ahe): Use source maps to translate stack traces. |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1342 token = token.next; | 1343 token = token.next; |
1343 kind = token.kind; | 1344 kind = token.kind; |
1344 } | 1345 } |
1345 return token; | 1346 return token; |
1346 } | 1347 } |
1347 | 1348 |
1348 String extractQuote(String string) { | 1349 String extractQuote(String string) { |
1349 StringQuoting q = StringValidator.quotingFromString(string); | 1350 StringQuoting q = StringValidator.quotingFromString(string); |
1350 return (q.raw ? 'r' : '') + (q.quoteChar * q.leftQuoteLength); | 1351 return (q.raw ? 'r' : '') + (q.quoteChar * q.leftQuoteLength); |
1351 } | 1352 } |
OLD | NEW |