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

Side by Side Diff: pkg/analyzer/lib/src/generated/java_io.dart

Issue 2916303003: pkg/analyzer: Deprecate JavaSystemIO (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer.src.generated.java_io; 5 library analyzer.src.generated.java_io;
6 6
7 import "dart:io"; 7 import "dart:io";
8 8
9 import 'package:path/path.dart' as path; 9 import 'package:path/path.dart' as path;
10 10
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 String toString() => _path.toString(); 103 String toString() => _path.toString();
104 Uri toURI() { 104 Uri toURI() {
105 String absolutePath = getAbsolutePath(); 105 String absolutePath = getAbsolutePath();
106 return path.context.toUri(absolutePath); 106 return path.context.toUri(absolutePath);
107 } 107 }
108 108
109 Directory _newDirectory() => new Directory(_path); 109 Directory _newDirectory() => new Directory(_path);
110 File _newFile() => new File(_path); 110 File _newFile() => new File(_path);
111 } 111 }
112 112
113 @Deprecated("Only used by `DirectoryBasedDartSdk`, which is also deprecated.")
113 class JavaSystemIO { 114 class JavaSystemIO {
114 static Map<String, String> _properties = new Map(); 115 static Map<String, String> _properties = new Map();
115 static String getenv(String name) => Platform.environment[name]; 116 static String getenv(String name) => Platform.environment[name];
116 static String getProperty(String name) { 117 static String getProperty(String name) {
117 { 118 {
118 String value = _properties[name]; 119 String value = _properties[name];
119 if (value != null) { 120 if (value != null) {
120 return value; 121 return value;
121 } 122 }
122 } 123 }
(...skipping 21 matching lines...) Expand all
144 } 145 }
145 // probably be "dart-sdk/bin/dart" 146 // probably be "dart-sdk/bin/dart"
146 sdkPath = path.context.dirname(path.context.dirname(exec)); 147 sdkPath = path.context.dirname(path.context.dirname(exec));
147 _properties[name] = sdkPath; 148 _properties[name] = sdkPath;
148 return sdkPath; 149 return sdkPath;
149 } 150 }
150 } 151 }
151 return null; 152 return null;
152 } 153 }
153 154
155 /// Only needed when when using `DirectoryBasedDartSdk`, which is also
156 /// deprecated.
157 ///
158 /// When using `FolderBasedDartSdk`, there is no need to set
159 /// `com.google.dart.sdk`.
160 @deprecated
154 static String setProperty(String name, String value) { 161 static String setProperty(String name, String value) {
155 String oldValue = _properties[name]; 162 String oldValue = _properties[name];
156 _properties[name] = value; 163 _properties[name] = value;
157 return oldValue; 164 return oldValue;
158 } 165 }
159 } 166 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698