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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/dom/rewrite/ASTRewriteAnalyzer.java

Issue 10384142: Initial support for 'Extract temp' - only when single expression selected (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use ASTVisitor as type switch Created 8 years, 7 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.tools.core/src/com/google/dart/tools/core/internal/dom/rewrite/ASTRewriteAnalyzer.java
diff --git a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/dom/rewrite/ASTRewriteAnalyzer.java b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/dom/rewrite/ASTRewriteAnalyzer.java
index 629bdb1ec93c585c17fcbc1468a390e26968b884..0fd770a780984857efaa3e987f3f6fac16e5e129 100644
--- a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/dom/rewrite/ASTRewriteAnalyzer.java
+++ b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/dom/rewrite/ASTRewriteAnalyzer.java
@@ -2969,11 +2969,17 @@ public final class ASTRewriteAnalyzer {
private final void voidVisit(DartNode parent, StructuralPropertyDescriptor property) {
Object node = getOriginalValue(parent, property);
- if (property.isChildProperty() && node != null) {
+ // TODO(scheglov)
+ if (property.isChildProperty() && node instanceof DartNode) {
voidVisit((DartNode) node);
} else if (property.isChildListProperty()) {
voidVisitList((List<DartNode>) node);
}
+// if (property.isChildProperty() && node != null) {
+// voidVisit((DartNode) node);
+// } else if (property.isChildListProperty()) {
+// voidVisitList((List<DartNode>) node);
+// }
}
private void voidVisitList(List<DartNode> list) {

Powered by Google App Engine
This is Rietveld 408576698