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

Unified Diff: editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/engine/MainEngine.java

Issue 68233003: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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: editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/engine/MainEngine.java
diff --git a/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/engine/MainEngine.java b/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/engine/MainEngine.java
index 1fffc4c3a09ca8bd9d24d46d26d728aaaa180515..add8bfcbad19f8089296a224831db28a0ac202b1 100644
--- a/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/engine/MainEngine.java
+++ b/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/engine/MainEngine.java
@@ -651,8 +651,9 @@ public class MainEngine {
unit.getDirectives().add(libraryDirective("engine", "error"));
unit.getDirectives().add(importDirective("java_core.dart", null));
unit.getDirectives().add(importDirective("source.dart", null));
- unit.getDirectives().add(importDirective("ast.dart", null, importShowCombinator("ASTNode")));
unit.getDirectives().add(importDirective("scanner.dart", null, importShowCombinator("Token")));
+ unit.getDirectives().add(importDirective("ast.dart", null, importShowCombinator("ASTNode")));
+ unit.getDirectives().add(importDirective("element.dart", null, importShowCombinator("Element")));
for (Entry<File, List<CompilationUnitMember>> entry : context.getFileToMembers().entrySet()) {
File file = entry.getKey();
if (isEnginePath(file, "error/") || isEnginePath(file, "internal/error/")) {
@@ -1123,7 +1124,7 @@ public class MainEngine {
* Removes trailing spaces from the given Dart source.
*/
private static String removeTrailingWhitespaces(String source) {
- String[] lines = StringUtils.split(source, '\n');
+ String[] lines = StringUtils.splitPreserveAllTokens(source, '\n');
for (int i = 0; i < lines.length; i++) {
lines[i] = StringUtils.stripEnd(lines[i], null);
}

Powered by Google App Engine
This is Rietveld 408576698