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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/ast/NameOccurrencesFinder.java

Issue 11377039: Issue 6251. Resolve and rename type and constructor references in [new Type.name]. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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.core/src/com/google/dart/tools/core/utilities/ast/NameOccurrencesFinder.java
diff --git a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/ast/NameOccurrencesFinder.java b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/ast/NameOccurrencesFinder.java
index b0a0a6cdbb8bc17f2442028a1288304e14d1fa8b..d549ec607bb0a231595879ddfaff110171cb095a 100644
--- a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/ast/NameOccurrencesFinder.java
+++ b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/ast/NameOccurrencesFinder.java
@@ -14,6 +14,8 @@
package com.google.dart.tools.core.utilities.ast;
import com.google.dart.compiler.ast.ASTVisitor;
+import com.google.dart.compiler.ast.DartCommentNewName;
+import com.google.dart.compiler.ast.DartCommentRefName;
import com.google.dart.compiler.ast.DartExpression;
import com.google.dart.compiler.ast.DartIdentifier;
import com.google.dart.compiler.ast.DartInvocation;
@@ -50,6 +52,22 @@ public class NameOccurrencesFinder extends ASTVisitor<Void> {
}
@Override
+ public Void visitCommentNewName(DartCommentNewName node) {
+ if (node.getElement() == target) {
+ addMatch(node);
+ }
+ return super.visitCommentNewName(node);
+ }
+
+ @Override
+ public Void visitCommentRefName(DartCommentRefName node) {
+ if (node.getElement() == target) {
+ addMatch(node);
+ }
+ return super.visitCommentRefName(node);
+ }
+
+ @Override
public Void visitIdentifier(DartIdentifier node) {
try {
if (node.getElement() == target) {

Powered by Google App Engine
This is Rietveld 408576698