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

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

Issue 131233009: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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/engine/EngineSemanticProcessor.java
diff --git a/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/engine/EngineSemanticProcessor.java b/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/engine/EngineSemanticProcessor.java
index 2b99c84146b0c641fdbc07002d16d81c4423cb37..07b41de1b22f94107f25a32289c3a99ad0e28a73 100644
--- a/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/engine/EngineSemanticProcessor.java
+++ b/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/engine/EngineSemanticProcessor.java
@@ -454,9 +454,12 @@ public class EngineSemanticProcessor extends SemanticProcessor {
public Void visitTypeName(TypeName node) {
ITypeBinding binding = context.getNodeTypeBinding(node);
if (binding != null) {
- String shortName = binding.getName();
- shortName = StringUtils.substringBefore(shortName, "<");
if (isPrefixPackage(binding)) {
+ String shortName = node.getName().getName();
+ if (shortName.indexOf('.') != -1) {
+ shortName = StringUtils.substringAfterLast(shortName, ".");
+ }
+ shortName = StringUtils.substringBefore(shortName, "<");
node.setName(identifier(prefixName, shortName));
return null;
}
@@ -588,8 +591,8 @@ public class EngineSemanticProcessor extends SemanticProcessor {
Block tryCacheBlock = block();
ExpressionStatement statement = expressionStatement(methodInvocation(
receiverIdent,
- "accept2",
- methodInvocation(identifier("file"), "readAsStringSync"),
+ "accept",
+ methodInvocation(identifier("file"), "readAsCharSequenceSync"),
methodInvocation(identifier("file"), "lastModified")));
node.setBody(blockFunctionBody(tryCacheBlock, statement));
return null;

Powered by Google App Engine
This is Rietveld 408576698