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

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

Issue 17406010: Move getters from Options to Platform (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed Dart_GetType Created 7 years, 5 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
« no previous file with comments | « no previous file | pkg/analyzer_experimental/lib/options.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
(...skipping 10 matching lines...) Expand all
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 }
29 } 29 }
30 if (name == 'com.google.dart.sdk') { 30 if (name == 'com.google.dart.sdk') {
31 String exec = new Options().executable; 31 String exec = Platform.executable;
32 if (exec.length != 0) { 32 if (exec.length != 0) {
33 String sdkPath; 33 String sdkPath;
34 // may be "xcodebuild/ReleaseIA32/dart" with "dart-sdk" sibling 34 // may be "xcodebuild/ReleaseIA32/dart" with "dart-sdk" sibling
35 { 35 {
36 sdkPath = new Path(exec).directoryPath.append("dart-sdk").toNativePath (); 36 sdkPath = new Path(exec).directoryPath.append("dart-sdk").toNativePath ();
37 if (new Directory(sdkPath).existsSync()) { 37 if (new Directory(sdkPath).existsSync()) {
38 _properties[name] = sdkPath; 38 _properties[name] = sdkPath;
39 return sdkPath; 39 return sdkPath;
40 } 40 }
41 } 41 }
(...skipping 68 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
« no previous file with comments | « no previous file | pkg/analyzer_experimental/lib/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698