Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitCommitsModelCache.java')
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitCommitsModelCache.java45
1 files changed, 36 insertions, 9 deletions
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitCommitsModelCache.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitCommitsModelCache.java
index c655ee68af..04dd4ac00e 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitCommitsModelCache.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitCommitsModelCache.java
@@ -8,8 +8,6 @@
*******************************************************************************/
package org.eclipse.egit.core.synchronize;
-import static org.eclipse.compare.structuremergeviewer.Differencer.LEFT;
-import static org.eclipse.compare.structuremergeviewer.Differencer.RIGHT;
import static org.eclipse.jgit.lib.ObjectId.zeroId;
import java.io.IOException;
@@ -19,7 +17,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import org.eclipse.compare.structuremergeviewer.Differencer;
import org.eclipse.jgit.lib.AbbreviatedObjectId;
import org.eclipse.jgit.lib.MutableObjectId;
import org.eclipse.jgit.lib.ObjectId;
@@ -37,6 +34,36 @@ import org.eclipse.jgit.treewalk.filter.TreeFilter;
public class GitCommitsModelCache {
/**
+ * Constant copied from org.eclipse.compare.structuremergeviewer.Differencer.ADDITION
+ * in order to avoid UI dependencies introduced by the org.eclipse.compare bundle
+ */
+ public static final int ADDITION = 1;
+
+ /**
+ * Constant copied from org.eclipse.compare.structuremergeviewer.Differencer.DELETION
+ * in order to avoid UI dependencies introduced by the org.eclipse.compare bundle
+ */
+ public static final int DELETION = 2;
+
+ /**
+ * Constant copied from org.eclipse.compare.structuremergeviewer.Differencer.CHANGE
+ * in order to avoid UI dependencies introduced by the org.eclipse.compare bundle
+ */
+ public static final int CHANGE = 3;
+
+ /**
+ * Constant copied from org.eclipse.compare.structuremergeviewer.Differencer.LEFT
+ * in order to avoid UI dependencies introduced by the org.eclipse.compare bundle
+ */
+ public static final int LEFT = 4;
+
+ /**
+ * Constant copied from org.eclipse.compare.structuremergeviewer.Differencer.RIGHT
+ * in order to avoid UI dependencies introduced by the org.eclipse.compare bundle
+ */
+ public static final int RIGHT = 8;
+
+ /**
* Corresponds to {@link RevCommit} object, but contains only those data
* that are required by Synchronize view Change Set
*/
@@ -61,8 +88,8 @@ public class GitCommitsModelCache {
/**
* Indicates if this commit is incoming or outgoing. Returned value
- * corresponds to {@link Differencer#LEFT} for incoming and
- * {@link Differencer#RIGHT} for outgoing changes
+ * corresponds to org.eclipse.compare.structuremergeviewer.Differencer#LEFT for incoming and
+ * org.eclipse.compare.structuremergeviewer.Differencer#RIGHT for outgoing changes
*
* @return change direction
*/
@@ -140,7 +167,7 @@ public class GitCommitsModelCache {
* change.
*
* It uses static values of LEFT, RIGHT, ADDITION, DELETION, CHANGE from
- * {@link Differencer} class.
+ * org.eclipse.compare.structuremergeviewer.Differencer class.
*
* @return kind
*/
@@ -332,12 +359,12 @@ public class GitCommitsModelCache {
Change change) {
if (ZERO_ID.equals(change.objectId)) {
change.objectId = null; // clear zero id;
- change.kind = direction | Differencer.DELETION;
+ change.kind = direction | DELETION;
} else if (ZERO_ID.equals(change.remoteObjectId)) {
change.remoteObjectId = null; // clear zero id;
- change.kind = direction | Differencer.ADDITION;
+ change.kind = direction | ADDITION;
} else
- change.kind = direction | Differencer.CHANGE;
+ change.kind = direction | CHANGE;
}
}

Back to the top