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

Unified Diff: editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/internal/refactoring/InlineLocalRefactoringImpl.java

Issue 14322008: Version 0.4.7.3 . (Closed) Base URL: http://dart.googlecode.com/svn/trunk/dart/
Patch Set: Created 7 years, 8 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.engine.services/src/com/google/dart/engine/services/internal/refactoring/InlineLocalRefactoringImpl.java
===================================================================
--- editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/internal/refactoring/InlineLocalRefactoringImpl.java (revision 21601)
+++ editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/internal/refactoring/InlineLocalRefactoringImpl.java (working copy)
@@ -24,6 +24,7 @@
import com.google.dart.engine.ast.VariableDeclaration;
import com.google.dart.engine.ast.VariableDeclarationList;
import com.google.dart.engine.ast.VariableDeclarationStatement;
+import com.google.dart.engine.element.Element;
import com.google.dart.engine.element.LocalVariableElement;
import com.google.dart.engine.formatter.edit.Edit;
import com.google.dart.engine.scanner.TokenType;
@@ -80,8 +81,9 @@
ASTNode coveringNode = context.getCoveringNode();
if (coveringNode instanceof SimpleIdentifier) {
SimpleIdentifier coveringIdentifier = (SimpleIdentifier) coveringNode;
- if (coveringIdentifier.getElement() instanceof LocalVariableElement) {
- variableElement = (LocalVariableElement) coveringIdentifier.getElement();
+ Element element = coveringIdentifier.getElement();
+ if (element instanceof LocalVariableElement) {
+ variableElement = (LocalVariableElement) element;
variableNode = utils.findNode(
variableElement.getNameOffset(),
VariableDeclaration.class);

Powered by Google App Engine
This is Rietveld 408576698