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

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

Issue 12593009: Don't cast to NodeElement where not needed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file. Created 7 years, 9 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/SemanticHighlightings.java
diff --git a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SemanticHighlightings.java b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SemanticHighlightings.java
index df7882b33193364cf8f5037d510512cda937fa27..c17761d06d208efe6d2bc425e04a4a9f7ccd7ea6 100644
--- a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SemanticHighlightings.java
+++ b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SemanticHighlightings.java
@@ -44,7 +44,6 @@ import com.google.dart.compiler.resolver.Element;
import com.google.dart.compiler.resolver.ElementKind;
import com.google.dart.compiler.resolver.FieldElement;
import com.google.dart.compiler.resolver.LibraryElement;
-import com.google.dart.compiler.resolver.NodeElement;
import com.google.dart.compiler.util.apache.StringUtils;
import com.google.dart.tools.core.dom.PropertyDescriptorHelper;
import com.google.dart.tools.core.model.SourceRange;
@@ -493,7 +492,7 @@ public class SemanticHighlightings {
@Override
public boolean consumesIdentifier(SemanticToken token) {
DartIdentifier node = token.getNodeIdentifier();
- NodeElement element = node.getElement();
+ Element element = node.getElement();
boolean isField = ElementKind.of(element) == ElementKind.FIELD;
if (isField) {
/*
@@ -609,7 +608,7 @@ public class SemanticHighlightings {
@Override
public boolean consumesIdentifier(SemanticToken token) {
DartIdentifier node = token.getNodeIdentifier();
- NodeElement element = node.getElement();
+ Element element = node.getElement();
return ElementKind.of(element) == ElementKind.VARIABLE;
}
@@ -690,7 +689,7 @@ public class SemanticHighlightings {
@Override
public boolean consumesIdentifier(SemanticToken token) {
DartIdentifier node = token.getNodeIdentifier();
- NodeElement element = node.getElement();
+ Element element = node.getElement();
return ElementKind.of(element) == ElementKind.METHOD;
}
@@ -816,7 +815,7 @@ public class SemanticHighlightings {
@Override
public boolean consumesIdentifier(SemanticToken token) {
DartIdentifier node = token.getNodeIdentifier();
- NodeElement element = node.getElement();
+ Element element = node.getElement();
if (element == null || element.isDynamic()) {
return false;
}
@@ -884,7 +883,7 @@ public class SemanticHighlightings {
@Override
public boolean consumesIdentifier(SemanticToken token) {
DartIdentifier node = token.getNodeIdentifier();
- NodeElement element = node.getElement();
+ Element element = node.getElement();
return ElementKind.of(element) == ElementKind.METHOD && element.getModifiers().isStatic();
}

Powered by Google App Engine
This is Rietveld 408576698