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

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

Issue 10477005: Re-enable scan thresholds when opening folder (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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
Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/LibraryScanTask.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/LibraryScanTask.java (revision 8212)
+++ editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/LibraryScanTask.java (working copy)
@@ -37,6 +37,7 @@
private final AnalysisServer server;
private final Context context;
private final File rootFile;
+ private final boolean fullScan;
private final ArrayList<File> filesToScan = new ArrayList<File>(200);
private final HashSet<File> libraryFiles = new HashSet<File>(50);
private final HashSet<File> looseFiles = new HashSet<File>(200);
@@ -48,10 +49,11 @@
private long bytesOfCode = 0;
private long scanEndThreshold = 0;
- LibraryScanTask(AnalysisServer server, Context context, File rootFile) {
+ LibraryScanTask(AnalysisServer server, Context context, File rootFile, boolean fullScan) {
this.server = server;
this.context = context;
this.rootFile = rootFile;
+ this.fullScan = fullScan;
this.filesToScan.add(rootFile);
this.ignoreManager = DartIgnoreManager.getInstance();
}
@@ -83,16 +85,17 @@
// If over the scan threshold, then mark the root to be ignored and abort the scan
- // TODO(devoncarew): temporarily disabling the analysis threshold
-// if (bytesOfCode > SCAN_BYTE_THRESHOLD || System.currentTimeMillis() > scanEndThreshold) {
-// try {
-// ignoreManager.addToIgnores(rootFile);
-// } catch (IOException e) {
-// DartCore.logError("Failed to ignore " + rootFile, e);
-// }
-// server.discard(rootFile);
-// return;
-// }
+ if (!fullScan) {
+ if (bytesOfCode > SCAN_BYTE_THRESHOLD || System.currentTimeMillis() > scanEndThreshold) {
+ try {
+ ignoreManager.addToIgnores(rootFile);
+ } catch (IOException e) {
+ DartCore.logError("Failed to ignore " + rootFile, e);
+ }
+ server.discard(rootFile);
+ return;
+ }
+ }
}
// Parse libraries to determine sourced files

Powered by Google App Engine
This is Rietveld 408576698