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

Unified Diff: compiler/java/com/google/dart/compiler/DartCompiler.java

Issue 10448054: Issue 3155. Better error report for directives in sourced unit (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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 | « no previous file | compiler/java/com/google/dart/compiler/DartCompilerErrorCode.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/DartCompiler.java
diff --git a/compiler/java/com/google/dart/compiler/DartCompiler.java b/compiler/java/com/google/dart/compiler/DartCompiler.java
index ccf3f48a986a66720c1c515b1236b5a9cf6a668f..796d5f1c28d2fc183f788c2f3f6d301ee9b2252a 100644
--- a/compiler/java/com/google/dart/compiler/DartCompiler.java
+++ b/compiler/java/com/google/dart/compiler/DartCompiler.java
@@ -34,6 +34,7 @@ import com.google.dart.compiler.resolver.CoreTypeProvider;
import com.google.dart.compiler.resolver.CoreTypeProviderImplementation;
import com.google.dart.compiler.resolver.Element;
import com.google.dart.compiler.resolver.ElementKind;
+import com.google.dart.compiler.resolver.Elements;
import com.google.dart.compiler.resolver.LibraryElement;
import com.google.dart.compiler.resolver.MemberBuilder;
import com.google.dart.compiler.resolver.MethodElement;
@@ -676,7 +677,7 @@ public class DartCompiler {
if (dartSource.getRelativePath().equals(sourceNode.getText())) {
context.onError(new DartCompilationError(unit.getDirectives().get(0),
DartCompilerErrorCode.ILLEGAL_DIRECTIVES_IN_SOURCED_UNIT,
- dartSource.getRelativePath()));
+ Elements.getRelativeSourcePath(dartSource, lib.getSource())));
}
}
}
@@ -1226,6 +1227,8 @@ public class DartCompiler {
// Ignore errors. Resolver and TypeAnalyzer should be able to cope with
// resolution errors.
}
+ // To help support the IDE, notify the listener that this unit is compiled.
+ context.unitCompiled(unit);
}
}
}
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/DartCompilerErrorCode.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698