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

Unified Diff: editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/SyntaxTranslator.java

Issue 12543009: Use JavaFile instead of Dart File. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/SyntaxTranslator.java
diff --git a/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/SyntaxTranslator.java b/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/SyntaxTranslator.java
index b63156e0cc5fbe0a09f21d89026e7abb5e02d551..ae26e459c797ae6402bb406c81fe12a6a809b683 100644
--- a/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/SyntaxTranslator.java
+++ b/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/SyntaxTranslator.java
@@ -853,9 +853,11 @@ public class SyntaxTranslator extends org.eclipse.jdt.core.dom.ASTVisitor {
@Override
public boolean visit(org.eclipse.jdt.core.dom.FieldAccess node) {
- return done(propertyAccess(
+ PropertyAccess result = propertyAccess(
translateExpression(node.getExpression()),
- (SimpleIdentifier) translate(node.getName())));
+ (SimpleIdentifier) translate(node.getName()));
+ context.putNodeBinding(result, node.resolveFieldBinding());
+ return done(result);
}
@Override
@@ -1256,11 +1258,11 @@ public class SyntaxTranslator extends org.eclipse.jdt.core.dom.ASTVisitor {
@Override
public boolean visit(org.eclipse.jdt.core.dom.QualifiedName node) {
- Token operator = new Token(TokenType.PERIOD, 0);
- return done(new PropertyAccess(
+ PropertyAccess result = propertyAccess(
translateExpression(node.getQualifier()),
- operator,
- translateSimpleName(node.getName())));
+ translateSimpleName(node.getName()));
+ context.putNodeBinding(result, node.resolveBinding());
+ return done(result);
}
@Override

Powered by Google App Engine
This is Rietveld 408576698