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

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/rename/RenameLocalVariableProcessor.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.ui/src/com/google/dart/tools/internal/corext/refactoring/rename/RenameLocalVariableProcessor.java
diff --git a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/rename/RenameLocalVariableProcessor.java b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/rename/RenameLocalVariableProcessor.java
index 98116e35e09a1344b5544ab449b7128c24718167..4da8bfb6a015b106efa4a2a1d21f8bfae1c68666 100644
--- a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/rename/RenameLocalVariableProcessor.java
+++ b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/rename/RenameLocalVariableProcessor.java
@@ -17,6 +17,7 @@ import com.google.common.base.Objects;
import com.google.common.collect.Lists;
import com.google.dart.compiler.ast.ASTNodes;
import com.google.dart.compiler.ast.ASTVisitor;
+import com.google.dart.compiler.ast.DartCommentRefName;
import com.google.dart.compiler.ast.DartIdentifier;
import com.google.dart.compiler.ast.DartMethodDefinition;
import com.google.dart.compiler.ast.DartNode;
@@ -367,6 +368,16 @@ public class RenameLocalVariableProcessor extends DartRenameProcessor {
DartNode enclosingMethod = ASTNodes.getParent(variableNode, DartMethodDefinition.class);
enclosingMethod.accept(new ASTVisitor<Void>() {
@Override
+ public Void visitCommentRefName(DartCommentRefName node) {
+ if (node.getElement() == variableElement) {
+ int offset = node.getSourceInfo().getOffset() + "[".length();
+ TextEdit edit = createRenameEdit(offset);
+ edits.add(edit);
+ }
+ return null;
+ }
+
+ @Override
public Void visitIdentifier(DartIdentifier node) {
if (node.getElement() == variableElement) {
int offset = node.getSourceInfo().getOffset();

Powered by Google App Engine
This is Rietveld 408576698