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

Unified Diff: compiler/java/com/google/dart/compiler/resolver/Elements.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 | « compiler/java/com/google/dart/compiler/DartCompilerErrorCode.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/resolver/Elements.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/Elements.java b/compiler/java/com/google/dart/compiler/resolver/Elements.java
index d0a14e99ee283865bcbfc257a816e5a8e168eec5..8a10ccb365c0853c7b0373efed2e32205d1abafb 100644
--- a/compiler/java/com/google/dart/compiler/resolver/Elements.java
+++ b/compiler/java/com/google/dart/compiler/resolver/Elements.java
@@ -499,6 +499,13 @@ static FieldElementImplementation fieldFromNode(DartField node,
private static String getRelativeSourcePath(SourceInfo source, SourceInfo target) {
Source sourceSource = source.getSource();
Source targetSource = target.getSource();
+ return getRelativeSourcePath(sourceSource, targetSource);
+ }
+
+ /**
+ * @return the relative or absolute path from "source" to "target".
+ */
+ public static String getRelativeSourcePath(Source sourceSource, Source targetSource) {
// If both source are from file, prepare relative path.
if (sourceSource != null && targetSource != null) {
URI sourceUri = sourceSource.getUri();
« no previous file with comments | « compiler/java/com/google/dart/compiler/DartCompilerErrorCode.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698