Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Davis2014-08-11 18:04:40 -0400
committerSam Davis2014-08-14 18:50:09 -0400
commit26fcfac84264c6b510c0dd6be205a89042a9b25c (patch)
tree9972434d02a498e3111eecc37358d81a89f218ba /org.eclipse.mylyn.reviews.ui/src
parente79ec4ac24f570207528aa5b448fa808864a20aa (diff)
downloadorg.eclipse.mylyn.reviews-26fcfac84264c6b510c0dd6be205a89042a9b25c.tar.gz
org.eclipse.mylyn.reviews-26fcfac84264c6b510c0dd6be205a89042a9b25c.tar.xz
org.eclipse.mylyn.reviews-26fcfac84264c6b510c0dd6be205a89042a9b25c.zip
440821: refactor tests
Change-Id: I134c7b0660d668cfc7a323035b4df3b6d555dfee Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=440821
Diffstat (limited to 'org.eclipse.mylyn.reviews.ui/src')
-rw-r--r--org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/compare/ReviewCompareAnnotationSupport.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/compare/ReviewCompareAnnotationSupport.java b/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/compare/ReviewCompareAnnotationSupport.java
index c5b20bb4..a50d4bd6 100644
--- a/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/compare/ReviewCompareAnnotationSupport.java
+++ b/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/compare/ReviewCompareAnnotationSupport.java
@@ -13,6 +13,9 @@
package org.eclipse.mylyn.internal.reviews.ui.compare;
+import static org.eclipse.mylyn.internal.reviews.ui.compare.ReviewCompareAnnotationSupport.Side.LEFT_SIDE;
+import static org.eclipse.mylyn.internal.reviews.ui.compare.ReviewCompareAnnotationSupport.Side.RIGHT_SIDE;
+
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Collections;
@@ -59,15 +62,14 @@ import org.eclipse.ui.texteditor.AbstractTextEditor;
*/
@SuppressWarnings("restriction")
public class ReviewCompareAnnotationSupport {
+ public static enum Side {
+ LEFT_SIDE, RIGHT_SIDE
+ }
private static final int INTERRUPT_INTERVAL = 16;
private static final int PAUSE_DELAY = 250;
- public final int LEFT_SIDE = 0;
-
- public final int RIGHT_SIDE = 1;
-
private static String KEY_ANNOTAION_SUPPORT = ReviewItemSetCompareEditorInput.class.getName();
private CommentPopupDialog commentPopupDialog = null;
@@ -244,7 +246,7 @@ public class ReviewCompareAnnotationSupport {
return null;
}
- public int calculateNextAnnotation(Direction direction, Position nextLeftPosition, Position nextRightPosition,
+ public Side calculateNextAnnotation(Direction direction, Position nextLeftPosition, Position nextRightPosition,
Integer currentLeftOffset) {
if (direction == Direction.FORWARDS) {
if (nextLeftPosition.offset == nextRightPosition.offset) {

Back to the top