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

Unified Diff: editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/internal/correction/SelectionAnalyzer.java

Issue 12328102: Update dartc tests and services_test plugins to run from the buildbot_test plugin. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/internal/correction/SelectionAnalyzer.java
===================================================================
--- editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/internal/correction/SelectionAnalyzer.java (revision 19029)
+++ editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/internal/correction/SelectionAnalyzer.java (working copy)
@@ -13,6 +13,7 @@
*/
package com.google.dart.engine.services.internal.correction;
+import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import com.google.dart.engine.ast.ASTNode;
@@ -89,6 +90,20 @@
}
/**
+ * Notifies that selection ends in given {@link ASTNode}.
+ */
+ @VisibleForTesting
+ public void handleSelectionEndsIn(ASTNode node) {
+ }
+
+ /**
+ * Notifies that selection starts in given {@link ASTNode}.
+ */
+ @VisibleForTesting
+ public void handleSelectionStartsIn(ASTNode node) {
+ }
+
+ /**
* @return <code>true</code> if there are {@link ASTNode} fully covered by the selection
* {@link SourceRange}.
*/
@@ -96,6 +111,14 @@
return selectedNodes != null && !selectedNodes.isEmpty();
}
+ /**
+ * Resets selected nodes.
+ */
+ @VisibleForTesting
+ public void reset() {
+ selectedNodes = null;
+ }
+
@Override
public Void visitNode(ASTNode node) {
SourceRange nodeRange = rangeNode(node);
@@ -141,25 +164,6 @@
}
/**
- * Notifies that selection ends in given {@link ASTNode}.
- */
- protected void handleSelectionEndsIn(ASTNode node) {
- }
-
- /**
- * Notifies that selection starts in given {@link ASTNode}.
- */
- protected void handleSelectionStartsIn(ASTNode node) {
- }
-
- /**
- * Resets selected nodes.
- */
- protected void reset() {
- selectedNodes = null;
- }
-
- /**
* @return <code>true</code> if there was no selected nodes yet.
*/
private boolean isFirstNode() {

Powered by Google App Engine
This is Rietveld 408576698