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

Side by Side Diff: editor/util/plugins/com.google.dart.java2dart/resources/java_io.dart

Issue 17932005: New analyzer_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Disable resolver tests Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 library java.io; 1 library java.io;
2 2
3 import "dart:io"; 3 import "dart:io";
4 4
5 class JavaSystemIO { 5 class JavaSystemIO {
6 static Map<String, String> _properties = new Map(); 6 static Map<String, String> _properties = new Map();
7 static String getProperty(String name) { 7 static String getProperty(String name) {
8 { 8 {
9 String value = _properties[name]; 9 String value = _properties[name];
10 if (value != null) { 10 if (value != null) {
11 return value; 11 return value;
12 } 12 }
13 } 13 }
14 if (name == 'os.name') { 14 if (name == 'os.name') {
15 return Platform.operatingSystem; 15 return Platform.operatingSystem;
16 } 16 }
17 if (name == 'line.separator') { 17 if (name == 'line.separator') {
18 if (Platform.operatingSystem == 'windows') { 18 if (Platform.isWindows) {
19 return '\r\n'; 19 return '\r\n';
20 } 20 }
21 return '\n'; 21 return '\n';
22 } 22 }
23 if (name == 'com.google.dart.sdk') { 23 if (name == 'com.google.dart.sdk') {
24 String value = Platform.environment['DART_SDK']; 24 String value = Platform.environment['DART_SDK'];
25 if (value != null) { 25 if (value != null) {
26 _properties[name] = value; 26 _properties[name] = value;
27 return value; 27 return value;
28 } 28 }
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 List<JavaFile> files = []; 110 List<JavaFile> files = [];
111 List<FileSystemEntity> entities = _newDirectory().listSync(); 111 List<FileSystemEntity> entities = _newDirectory().listSync();
112 for (FileSystemEntity entity in entities) { 112 for (FileSystemEntity entity in entities) {
113 files.add(new JavaFile(entity.path)); 113 files.add(new JavaFile(entity.path));
114 } 114 }
115 return files; 115 return files;
116 } 116 }
117 File _newFile() => new File.fromPath(_path); 117 File _newFile() => new File.fromPath(_path);
118 Directory _newDirectory() => new Directory.fromPath(_path); 118 Directory _newDirectory() => new Directory.fromPath(_path);
119 } 119 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698