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

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

Issue 449583003: Fix for opening SDK sources. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 import 'java_core.dart' show JavaIOException, CharSequence; 4 import 'java_core.dart' show JavaIOException, CharSequence;
5 import 'package:path/path.dart' as pathos; 5 import 'package:path/path.dart' as pathos;
6 6
7 class JavaSystemIO { 7 class JavaSystemIO {
8 static Map<String, String> _properties = new Map(); 8 static Map<String, String> _properties = new Map();
9 static String getProperty(String name) { 9 static String getProperty(String name) {
10 { 10 {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 return oldValue; 49 return oldValue;
50 } 50 }
51 static String getenv(String name) => Platform.environment[name]; 51 static String getenv(String name) => Platform.environment[name];
52 } 52 }
53 53
54 class JavaFile { 54 class JavaFile {
55 static final String separator = Platform.pathSeparator; 55 static final String separator = Platform.pathSeparator;
56 static final int separatorChar = Platform.pathSeparator.codeUnitAt(0); 56 static final int separatorChar = Platform.pathSeparator.codeUnitAt(0);
57 String _path; 57 String _path;
58 JavaFile(String path) { 58 JavaFile(String path) {
59 _path = pathos.absolute(path); 59 _path = path;
60 } 60 }
61 JavaFile.relative(JavaFile base, String child) { 61 JavaFile.relative(JavaFile base, String child) {
62 if (child.isEmpty) { 62 if (child.isEmpty) {
63 this._path = base._path; 63 this._path = base._path;
64 } else { 64 } else {
65 this._path = pathos.join(base._path, child); 65 this._path = pathos.join(base._path, child);
66 } 66 }
67 } 67 }
68 JavaFile.fromUri(Uri uri) : this(pathos.fromUri(uri)); 68 JavaFile.fromUri(Uri uri) : this(pathos.fromUri(uri));
69 String toString() => _path.toString(); 69 String toString() => _path.toString();
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 var files = <JavaFile>[]; 123 var files = <JavaFile>[];
124 var entities = _newDirectory().listSync(); 124 var entities = _newDirectory().listSync();
125 for (FileSystemEntity entity in entities) { 125 for (FileSystemEntity entity in entities) {
126 files.add(new JavaFile(entity.path)); 126 files.add(new JavaFile(entity.path));
127 } 127 }
128 return files; 128 return files;
129 } 129 }
130 File _newFile() => new File(_path); 130 File _newFile() => new File(_path);
131 Directory _newDirectory() => new Directory(_path); 131 Directory _newDirectory() => new Directory(_path);
132 } 132 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/analysis_server.dart » ('j') | pkg/analysis_testing/lib/mock_sdk.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698