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

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

Issue 10391092: Update analysis server and indexer (Closed) Base URL: http://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
Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/AnalysisUtility.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/AnalysisUtility.java (revision 7590)
+++ editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/AnalysisUtility.java (working copy)
@@ -22,7 +22,6 @@
import com.google.dart.compiler.LibrarySource;
import com.google.dart.compiler.Source;
import com.google.dart.compiler.SystemLibraryManager;
-import com.google.dart.compiler.UrlDartSource;
import com.google.dart.compiler.ast.DartUnit;
import com.google.dart.compiler.ast.LibraryUnit;
import com.google.dart.compiler.parser.DartParser;
@@ -68,13 +67,16 @@
/**
* Parse a single file and report the errors/warnings.
*
+ * @param relPath the path to the file to be parsed relative to the library containing that file.
+ * This path should contain '/' rather than {@link File#separatorChar}
* @param prefixes the collection of import prefixes. If the file being parsed contains import
* directives, then this collection will be updated to include any specified prefixes
*/
static DartUnit parse(AnalysisServer server, File libraryFile, LibrarySource librarySource,
- File sourceFile, Set<String> prefixes) {
+ String relPath, Set<String> prefixes) {
ErrorListener errorListener = new ErrorListener(server);
- DartSource source = new UrlDartSource(sourceFile, librarySource);
+ DartSource source = librarySource.getSourceFor(relPath);
+ File sourceFile = new File(libraryFile.toURI().resolve(relPath));
String sourceCode = null;
try {

Powered by Google App Engine
This is Rietveld 408576698