| Index: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/context/AnalysisContextImpl.java
|
| diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/context/AnalysisContextImpl.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/context/AnalysisContextImpl.java
|
| index 0064dab1f14ed11db86d8f09b5056c1858fb75ad..9a36fc1d10f0a7f76c6edeac2948a627d5ff25db 100644
|
| --- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/context/AnalysisContextImpl.java
|
| +++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/context/AnalysisContextImpl.java
|
| @@ -100,6 +100,7 @@ import com.google.dart.engine.utilities.collection.ListUtilities;
|
| import com.google.dart.engine.utilities.collection.MapIterator;
|
| import com.google.dart.engine.utilities.io.PrintStringWriter;
|
| import com.google.dart.engine.utilities.source.LineInfo;
|
| +import com.google.dart.engine.utilities.translation.DartExpressionBody;
|
| import com.google.dart.engine.utilities.translation.DartOmit;
|
|
|
| import java.io.File;
|
| @@ -3713,12 +3714,9 @@ public class AnalysisContextImpl implements InternalAnalysisContext {
|
| private TaskData getNextAnalysisTaskForSource(Source source, SourceEntry sourceEntry,
|
| boolean isPriority, boolean hintsEnabled) {
|
| // Refuse to generate tasks for html based files that are above 1500 KB
|
| - if (sourceEntry instanceof HtmlEntryImpl && source instanceof FileBasedSource) {
|
| + if (isTooBigHtmlSourceEntry(source, sourceEntry)) {
|
| // TODO (jwren) we still need to report an error of some kind back to the client.
|
| - File file = ((FileBasedSource) source).getFile();
|
| - if (file.length() > (1500 * 1024)) {
|
| - return new TaskData(null, false);
|
| - }
|
| + return new TaskData(null, false);
|
| }
|
| if (sourceEntry == null) {
|
| return new TaskData(null, false);
|
| @@ -4294,6 +4292,15 @@ public class AnalysisContextImpl implements InternalAnalysisContext {
|
| return false;
|
| }
|
|
|
| + @DartExpressionBody("false")
|
| + private boolean isTooBigHtmlSourceEntry(Source source, SourceEntry sourceEntry) {
|
| + if (sourceEntry instanceof HtmlEntryImpl && source instanceof FileBasedSource) {
|
| + File file = ((FileBasedSource) source).getFile();
|
| + return file.length() > 1500 * 1024;
|
| + }
|
| + return false;
|
| + }
|
| +
|
| /**
|
| * Log the given debugging information.
|
| *
|
|
|