| Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/Context.java
|
| ===================================================================
|
| --- editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/Context.java (revision 9145)
|
| +++ editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/Context.java (working copy)
|
| @@ -102,6 +102,12 @@
|
| * <code>null</code> if none
|
| */
|
| public void parse(File libraryFile, File dartFile, ParseCallback callback) {
|
| + if (!libraryFile.isAbsolute()) {
|
| + throw new IllegalArgumentException("File path must be absolute: " + libraryFile);
|
| + }
|
| + if (libraryFile.isDirectory()) {
|
| + throw new IllegalArgumentException("Cannot parse a directory: " + libraryFile);
|
| + }
|
| String relPath = libraryFile.toURI().relativize(dartFile.toURI()).getPath();
|
| server.queueNewTask(new ParseFileTask(server, this, libraryFile, relPath, dartFile, callback));
|
| }
|
| @@ -137,6 +143,9 @@
|
| if (!libraryFile.isAbsolute()) {
|
| throw new IllegalArgumentException("File path must be absolute: " + libraryFile);
|
| }
|
| + if (libraryFile.isDirectory()) {
|
| + throw new IllegalArgumentException("Cannot resolve a directory: " + libraryFile);
|
| + }
|
| server.queueNewTask(new AnalyzeLibraryTask(server, this, libraryFile, callback));
|
| }
|
|
|
|
|