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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/visitor/ElementLocator.java

Issue 571523002: Issue 20894. Rename 'Class' when rename refactoring is activated on 'Class' in 'new Class.name()'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/ast/visitor/ElementLocatorTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/visitor/ElementLocator.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/visitor/ElementLocator.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/visitor/ElementLocator.java
index 4e626333e58d0c9dfe2adb6161ae0efddd7c7c5f..4e1c06f08d6a2740e3efffbc66b74ce2334bca55 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/visitor/ElementLocator.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/visitor/ElementLocator.java
@@ -20,7 +20,6 @@ import com.google.dart.engine.ast.BinaryExpression;
import com.google.dart.engine.ast.ClassDeclaration;
import com.google.dart.engine.ast.CompilationUnit;
import com.google.dart.engine.ast.ConstructorDeclaration;
-import com.google.dart.engine.ast.ConstructorName;
import com.google.dart.engine.ast.FunctionDeclaration;
import com.google.dart.engine.ast.Identifier;
import com.google.dart.engine.ast.ImportDirective;
@@ -36,7 +35,6 @@ import com.google.dart.engine.ast.PrefixExpression;
import com.google.dart.engine.ast.PrefixedIdentifier;
import com.google.dart.engine.ast.SimpleIdentifier;
import com.google.dart.engine.ast.StringLiteral;
-import com.google.dart.engine.ast.TypeName;
import com.google.dart.engine.ast.UriBasedDirective;
import com.google.dart.engine.ast.VariableDeclaration;
import com.google.dart.engine.element.ClassElement;
@@ -101,25 +99,6 @@ public class ElementLocator {
return annotation.getElement();
}
}
- // Type name in InstanceCreationExpression
- {
- AstNode typeNameCandidate = parent;
- // new prefix.node[.constructorName]()
- if (typeNameCandidate instanceof PrefixedIdentifier) {
- PrefixedIdentifier prefixedIdentifier = (PrefixedIdentifier) typeNameCandidate;
- if (prefixedIdentifier.getIdentifier() == node) {
- typeNameCandidate = prefixedIdentifier.getParent();
- }
- }
- // new typeName[.constructorName]()
- if (typeNameCandidate instanceof TypeName) {
- TypeName typeName = (TypeName) typeNameCandidate;
- if (typeName.getParent() instanceof ConstructorName) {
- ConstructorName constructorName = (ConstructorName) typeName.getParent();
- return constructorName.getStaticElement();
- }
- }
- }
// Extra work to map Constructor Declarations to their associated Constructor Elements
if (parent instanceof ConstructorDeclaration) {
ConstructorDeclaration decl = (ConstructorDeclaration) parent;
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/ast/visitor/ElementLocatorTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698