| 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 dd5b2a37e6102750c389064c9dbcc3c2e52dcb88..a8237c85205516450984caaee0001f583743cd7e 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
|
| @@ -31,6 +31,7 @@ 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.DartSourceDirective;
|
| +import com.google.dart.compiler.ast.DartStringLiteral;
|
| import com.google.dart.compiler.ast.DartTypeNode;
|
| import com.google.dart.compiler.ast.DartVariable;
|
| import com.google.dart.compiler.ast.ImportCombinator;
|
| @@ -300,9 +301,19 @@ public class SemanticHighlightings {
|
| */
|
| private static final class DeprecatedElementHighlighting extends DefaultSemanticHighlighting {
|
| @Override
|
| + public boolean consumes(SemanticToken token) {
|
| + DartNode node = token.getNode();
|
| + if (node instanceof DartStringLiteral && node.getParent() instanceof DartImportDirective) {
|
| + Element element = node.getElement();
|
| + return element != null && element.getMetadata().isDeprecated();
|
| + }
|
| + return false;
|
| + }
|
| +
|
| + @Override
|
| public boolean consumesIdentifier(SemanticToken token) {
|
| DartIdentifier node = token.getNodeIdentifier();
|
| - NodeElement element = node.getElement();
|
| + Element element = node.getElement();
|
| return element != null && element.getMetadata().isDeprecated();
|
| }
|
|
|
|
|