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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/context/AnalysisOptionsImpl.java

Issue 262253002: Add flag to AnalysisOptions to be able to disable deferred loading. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase with bleeding_edge, updated status files not to break build Created 6 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.engine/src/com/google/dart/engine/internal/context/AnalysisOptionsImpl.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/context/AnalysisOptionsImpl.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/context/AnalysisOptionsImpl.java
index 3dd3f7d116e3be629aa2da4126d98a9bcdd3f63e..573fdefb4811be44a3ce9d3aad8154c229c17ace 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/context/AnalysisOptionsImpl.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/context/AnalysisOptionsImpl.java
@@ -27,6 +27,11 @@ public class AnalysisOptionsImpl implements AnalysisOptions {
public static final int DEFAULT_CACHE_SIZE = 64;
/**
+ * The default value for enabling deferred loading.
+ */
+ public static boolean DEFAULT_ENABLE_DEFERRED_LOADING = false;
+
+ /**
* The maximum number of sources for which AST structures should be kept in the cache.
*/
private int cacheSize = DEFAULT_CACHE_SIZE;
@@ -74,6 +79,11 @@ public class AnalysisOptionsImpl implements AnalysisOptions {
private boolean analyzePolymer = true;
/**
+ * A flag indicating whether analysis is to enable deferred loading.
+ */
+ private boolean enableDeferredLoading = DEFAULT_ENABLE_DEFERRED_LOADING;
+
+ /**
* Initialize a newly created set of analysis options to have their default values.
*/
public AnalysisOptionsImpl() {
@@ -118,6 +128,11 @@ public class AnalysisOptionsImpl implements AnalysisOptions {
}
@Override
+ public boolean getEnableDeferredLoading() {
+ return enableDeferredLoading;
+ }
+
+ @Override
public boolean getGenerateSdkErrors() {
return generateSdkErrors;
}
@@ -185,6 +200,15 @@ public class AnalysisOptionsImpl implements AnalysisOptions {
}
/**
+ * Set whether deferred loading should be enabled.
+ *
+ * @param enableDeferredLoading {@code true} if deferred loading should be enabled
+ */
+ public void setEnableDeferredLoading(boolean enableDeferredLoading) {
+ this.enableDeferredLoading = enableDeferredLoading;
+ }
+
+ /**
* Set whether errors, warnings and hints should be generated for sources in the SDK to match the
* given value.
*

Powered by Google App Engine
This is Rietveld 408576698