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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/AnalysisServer.java

Issue 10692002: pass library files not directories to analysis server (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/Context.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/AnalysisServer.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/AnalysisServer.java (revision 9145)
+++ editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/AnalysisServer.java (working copy)
@@ -139,15 +139,18 @@
* Analyze the specified library, and keep that analysis current by tracking any changes. Also see
* {@link Context#resolve(File, ResolveCallback)}.
*
- * @param file the library file (not <code>null</code>)
+ * @param libraryFile the library file (not <code>null</code>)
*/
- public void analyze(File file) {
- if (!file.isAbsolute()) {
- throw new IllegalArgumentException("File path must be absolute: " + file);
+ public void analyze(File libraryFile) {
+ if (!libraryFile.isAbsolute()) {
+ throw new IllegalArgumentException("File path must be absolute: " + libraryFile);
}
+ if (libraryFile.isDirectory()) {
+ throw new IllegalArgumentException("Cannot analyze a directory: " + libraryFile);
+ }
synchronized (queue) {
- if (!libraryFiles.contains(file)) {
- libraryFiles.add(file);
+ if (!libraryFiles.contains(libraryFile)) {
+ libraryFiles.add(libraryFile);
// Append analysis task to the end of the queue so that any user requests take precedence
queueAnalyzeContext();
}
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/Context.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698