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

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

Issue 11362002: Option to disable syntax highlighter and use mostly semantic highlighter. Tests. (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
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 1ca43540a1ffa774ad547806ce469ea04e782f27..c804c7712461ae7b6d887d25240a826bdbef36ef 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
@@ -14,15 +14,22 @@
package com.google.dart.tools.ui.internal.text.editor;
import com.google.dart.compiler.ast.ASTVisitor;
+import com.google.dart.compiler.ast.DartClass;
import com.google.dart.compiler.ast.DartDoubleLiteral;
+import com.google.dart.compiler.ast.DartExportDirective;
+import com.google.dart.compiler.ast.DartExpression;
+import com.google.dart.compiler.ast.DartFieldDefinition;
+import com.google.dart.compiler.ast.DartFunctionTypeAlias;
import com.google.dart.compiler.ast.DartIdentifier;
import com.google.dart.compiler.ast.DartImportDirective;
import com.google.dart.compiler.ast.DartIntegerLiteral;
import com.google.dart.compiler.ast.DartLibraryDirective;
+import com.google.dart.compiler.ast.DartMethodDefinition;
import com.google.dart.compiler.ast.DartNode;
import com.google.dart.compiler.ast.DartPartOfDirective;
import com.google.dart.compiler.ast.DartPropertyAccess;
import com.google.dart.compiler.ast.DartSourceDirective;
+import com.google.dart.compiler.ast.DartStatement;
import com.google.dart.compiler.ast.DartUnit;
import com.google.dart.tools.core.model.DartElement;
import com.google.dart.tools.core.model.SourceRange;
@@ -63,12 +70,42 @@ public class SemanticHighlightingReconciler implements IDartReconcilingListener,
private final SemanticToken token = new SemanticToken();
@Override
+ public Void visitClass(DartClass node) {
+ processNode(token, node);
+ return super.visitClass(node);
+ }
+
+ @Override
public Void visitDoubleLiteral(DartDoubleLiteral node) {
processNode(token, node);
return super.visitDoubleLiteral(node);
}
@Override
+ public Void visitExportDirective(DartExportDirective node) {
+ processNode(token, node);
+ return super.visitExportDirective(node);
+ }
+
+ @Override
+ public Void visitExpression(DartExpression node) {
+ processNode(token, node);
+ return super.visitExpression(node);
+ }
+
+ @Override
+ public Void visitFieldDefinition(DartFieldDefinition node) {
+ processNode(token, node);
+ return super.visitFieldDefinition(node);
+ }
+
+ @Override
+ public Void visitFunctionTypeAlias(DartFunctionTypeAlias node) {
+ processNode(token, node);
+ return super.visitFunctionTypeAlias(node);
+ }
+
+ @Override
public Void visitIdentifier(DartIdentifier node) {
processNode(token, node);
return super.visitIdentifier(node);
@@ -93,6 +130,12 @@ public class SemanticHighlightingReconciler implements IDartReconcilingListener,
}
@Override
+ public Void visitMethodDefinition(DartMethodDefinition node) {
+ processNode(token, node);
+ return super.visitMethodDefinition(node);
+ }
+
+ @Override
public Void visitPartOfDirective(DartPartOfDirective node) {
processNode(token, node);
return super.visitPartOfDirective(node);
@@ -110,6 +153,12 @@ public class SemanticHighlightingReconciler implements IDartReconcilingListener,
return super.visitSourceDirective(node);
}
+ @Override
+ public Void visitStatement(DartStatement node) {
+ processNode(token, node);
+ return super.visitStatement(node);
+ }
+
/**
* Add a position with the given range and highlighting iff it does not exist already.
*

Powered by Google App Engine
This is Rietveld 408576698