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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/ParseLibraryFileTask.java

Issue 9860034: AnalysisServer fixes (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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
Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/ParseLibraryFileTask.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/ParseLibraryFileTask.java (revision 5855)
+++ editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/ParseLibraryFileTask.java (working copy)
@@ -19,6 +19,7 @@
import static com.google.dart.tools.core.analysis.AnalysisUtility.parse;
import java.io.File;
+import java.net.URI;
/**
* Parse a library source file and create the associated {@link Library}
@@ -33,7 +34,10 @@
this.server = server;
this.context = context;
this.libraryFile = libraryFile;
- this.librarySource = new UrlLibrarySource(libraryFile.toURI(), server.getLibraryManager());
+ URI fileUri = libraryFile.toURI();
+ URI shortUri = server.getLibraryManager().getShortUri(fileUri);
+ URI libUri = shortUri != null ? shortUri : fileUri;
+ this.librarySource = new UrlLibrarySource(libUri, server.getLibraryManager());
}
@Override

Powered by Google App Engine
This is Rietveld 408576698