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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/index/operation/OperationQueue.java

Issue 189433006: Support for DartBlockBody, DartExpressionBody, DartOmit in java2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/index/operation/OperationQueue.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/index/operation/OperationQueue.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/index/operation/OperationQueue.java
index 51547d7ddf5ec30afd2dffd0bab07016a79d3f95..3b3bf73625d49cd48c9d407d51d0b3eb3819c7b3 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/index/operation/OperationQueue.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/index/operation/OperationQueue.java
@@ -15,6 +15,7 @@ package com.google.dart.engine.internal.index.operation;
import com.google.common.collect.Lists;
import com.google.dart.engine.source.Source;
+import com.google.dart.engine.utilities.translation.DartBlockBody;
import java.util.Iterator;
import java.util.LinkedList;
@@ -156,6 +157,7 @@ public class OperationQueue {
}
}
+ @DartBlockBody({})
private void notifyOperationAvailable() {
nonQueryOperations.notifyAll();
}
@@ -163,6 +165,7 @@ public class OperationQueue {
/**
* Removes operations that should be removed when given {@link Source} is removed.
*/
+ @DartBlockBody({"operations.removeWhere((_) => _.removeWhenSourceRemoved(source));"})
Brian Wilkerson 2014/03/07 16:12:31 Is this re-write for performance, or is there some
scheglov 2014/03/07 22:47:44 It is much better to use idiomatic Dart implementa
private void removeForSource(Source source, LinkedList<IndexOperation> operations) {
for (Iterator<IndexOperation> iter = operations.listIterator(); iter.hasNext();) {
IndexOperation indexOperation = iter.next();
@@ -172,6 +175,7 @@ public class OperationQueue {
}
}
+ @DartBlockBody({})
private void waitForOperationAvailable(long timeout) throws InterruptedException {
nonQueryOperations.wait(timeout);
}

Powered by Google App Engine
This is Rietveld 408576698