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

Unified Diff: pkg/analyzer/lib/source/embedder.dart

Issue 2323173002: Remove several references to JavaFile (Closed)
Patch Set: Created 4 years, 3 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 | « pkg/analysis_server/test/utils.dart ('k') | pkg/analyzer/lib/src/generated/source_io.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/source/embedder.dart
diff --git a/pkg/analyzer/lib/source/embedder.dart b/pkg/analyzer/lib/source/embedder.dart
index ffcbfed592f6aaff656a66ba4482dfd068c9c4d9..7c9ab54e595d4aab5ca24947019b0fab4e499e18 100644
--- a/pkg/analyzer/lib/source/embedder.dart
+++ b/pkg/analyzer/lib/source/embedder.dart
@@ -7,6 +7,7 @@ library analyzer.source.embedder;
import 'dart:collection' show HashMap;
import 'dart:core' hide Resource;
+import 'dart:io' as io;
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer/source/package_map_provider.dart'
@@ -75,7 +76,7 @@ class EmbedderSdk extends AbstractDartSdk {
srcPath = library.path;
} else {
String libraryPath = library.path;
- int index = libraryPath.lastIndexOf(JavaFile.separator);
+ int index = libraryPath.lastIndexOf(io.Platform.pathSeparator);
if (index == -1) {
index = libraryPath.lastIndexOf('/');
if (index == -1) {
@@ -85,7 +86,7 @@ class EmbedderSdk extends AbstractDartSdk {
String prefix = libraryPath.substring(0, index + 1);
srcPath = '$prefix$relativePath';
}
- String filePath = srcPath.replaceAll('/', JavaFile.separator);
+ String filePath = srcPath.replaceAll('/', io.Platform.pathSeparator);
try {
JavaFile file = new JavaFile(filePath);
return new FileBasedSource(file, parseUriWithException(dartUri));
« no previous file with comments | « pkg/analysis_server/test/utils.dart ('k') | pkg/analyzer/lib/src/generated/source_io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698