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

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

Issue 459703002: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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/Context.java
diff --git a/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/Context.java b/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/Context.java
index f465ddb45875751b48992e8a5383ce89e9712ad3..98c487f38f105cb93cd9d41c2cda447a846e5748 100644
--- a/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/Context.java
+++ b/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/Context.java
@@ -561,6 +561,15 @@ public class Context {
}
/**
+ * Specifies that the given {@link File} should not be translated.
+ */
+ public void removeSourceFile(File file) {
+ Assert.isLegal(file.exists(), "File '" + file + "' does not exist.");
+ file = file.getAbsoluteFile();
+ sourceFiles.remove(file);
+ }
+
+ /**
* Specifies that all files in given folder should not be translated.
*/
public void removeSourceFiles(File folder) {
@@ -616,6 +625,9 @@ public class Context {
// move identifiers to the new signature
Object binding = nodeToBinding.get(declarationIdentifier);
List<SimpleIdentifier> identifiers = bindingToIdentifiers.get(binding);
+ if (identifiers == null) {
+ return;
+ }
// update identifiers to the new name
for (SimpleIdentifier identifier : identifiers) {
identifier.setToken(token(TokenType.IDENTIFIER, newName));

Powered by Google App Engine
This is Rietveld 408576698