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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/dom/PropertyLocator.java

Issue 10824045: Fix for issue 3915 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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/dom/PropertyLocator.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/dom/PropertyLocator.java (revision 9937)
+++ editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/dom/PropertyLocator.java (working copy)
@@ -95,8 +95,8 @@
import java.util.List;
/**
- * Instances of the class <code>PropertyLocator</code> implement a visitor that returns a
- * description of the property whose value is (or contains) a given child node.
+ * Instances of the class <code>PropertyLocator</code> implement a visitor that returns a description of the
+ * property whose value is (or contains) a given child node.
*/
public class PropertyLocator extends ASTVisitor<StructuralPropertyDescriptor> {
/**
@@ -183,8 +183,8 @@
public StructuralPropertyDescriptor visitCase(DartCase node) {
if (childNode == node.getExpr()) {
return PropertyDescriptorHelper.DART_CASE_EXPRESSION;
- } else if (childNode == node.getLabel()) {
- return PropertyDescriptorHelper.DART_CASE_LABEL;
+ } else if (childContainedIn(node.getLabels())) {
+ return PropertyDescriptorHelper.DART_CASE_LABELS;
} else if (childContainedIn(node.getStatements())) {
return PropertyDescriptorHelper.DART_CASE_STATEMENTS;
} else {
@@ -624,7 +624,8 @@
}
@Override
- public StructuralPropertyDescriptor visitParenthesizedExpression(DartParenthesizedExpression node) {
+ public StructuralPropertyDescriptor visitParenthesizedExpression(
+ DartParenthesizedExpression node) {
if (childNode == node.getExpression()) {
return PropertyDescriptorHelper.DART_PARENTHESIZED_EXPRESSION_EXPRESSION;
} else {
@@ -722,8 +723,8 @@
@Override
public StructuralPropertyDescriptor visitSwitchMember(DartSwitchMember node) {
- if (childNode == node.getLabel()) {
- return PropertyDescriptorHelper.DART_SWITCH_MEMBER_LABEL;
+ if (childContainedIn(node.getLabels())) {
+ return PropertyDescriptorHelper.DART_SWITCH_MEMBER_LABELS;
} else if (childContainedIn(node.getStatements())) {
return PropertyDescriptorHelper.DART_SWITCH_MEMBER_STATEMENTS;
} else {
@@ -753,7 +754,8 @@
}
@Override
- public StructuralPropertyDescriptor visitSyntheticErrorStatement(DartSyntheticErrorStatement node) {
+ public StructuralPropertyDescriptor visitSyntheticErrorStatement(
+ DartSyntheticErrorStatement node) {
// if (childNode == node.getTokenString()) {
// return PropertyDescriptorHelper.DART_SYNTHETIC_ERROR_STATEMENT_TOKEN_STRING;
// } else {

Powered by Google App Engine
This is Rietveld 408576698