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

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SemanticHighlightingReconciler.java

Issue 11293018: Update semantic highlighting only if there are no parse errors (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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 | « compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SemanticHighlightingReconciler.java
diff --git a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SemanticHighlightingReconciler.java b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SemanticHighlightingReconciler.java
index c804c7712461ae7b6d887d25240a826bdbef36ef..6cd93873b4dc19a30224c695c652ba8fe32bab39 100644
--- a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SemanticHighlightingReconciler.java
+++ b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SemanticHighlightingReconciler.java
@@ -303,6 +303,11 @@ public class SemanticHighlightingReconciler implements IDartReconcilingListener,
@Override
public void reconciled(DartUnit ast, boolean forced, IProgressMonitor progressMonitor) {
+ // don't update semantic highlighting if there are parsing problems to avoid "flashing"
+ if (ast.hasParseErrors()) {
+ return;
+ }
+
// ensure at most one thread can be reconciling at any time
synchronized (fReconcileLock) {
if (fIsReconciling) {
« no previous file with comments | « compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698