diff options
6 files changed, 47 insertions, 21 deletions
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/AbstractCacheTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/AbstractCacheTest.java index e953fe80bc..2f1aa47cd3 100644 --- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/AbstractCacheTest.java +++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/AbstractCacheTest.java @@ -8,10 +8,10 @@ *******************************************************************************/ package org.eclipse.egit.core.synchronize; -import static org.eclipse.compare.structuremergeviewer.Differencer.ADDITION; -import static org.eclipse.compare.structuremergeviewer.Differencer.CHANGE; -import static org.eclipse.compare.structuremergeviewer.Differencer.DELETION; -import static org.eclipse.compare.structuremergeviewer.Differencer.RIGHT; +import static org.eclipse.egit.core.synchronize.GitCommitsModelCache.ADDITION; +import static org.eclipse.egit.core.synchronize.GitCommitsModelCache.CHANGE; +import static org.eclipse.egit.core.synchronize.GitCommitsModelCache.DELETION; +import static org.eclipse.egit.core.synchronize.GitCommitsModelCache.RIGHT; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.not; import static org.junit.Assert.assertNull; diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitCommitsModelCacheTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitCommitsModelCacheTest.java index 62c16592db..0207899023 100644 --- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitCommitsModelCacheTest.java +++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitCommitsModelCacheTest.java @@ -8,11 +8,11 @@ *******************************************************************************/ package org.eclipse.egit.core.synchronize; -import static org.eclipse.compare.structuremergeviewer.Differencer.ADDITION; -import static org.eclipse.compare.structuremergeviewer.Differencer.CHANGE; -import static org.eclipse.compare.structuremergeviewer.Differencer.DELETION; -import static org.eclipse.compare.structuremergeviewer.Differencer.LEFT; -import static org.eclipse.compare.structuremergeviewer.Differencer.RIGHT; +import static org.eclipse.egit.core.synchronize.GitCommitsModelCache.ADDITION; +import static org.eclipse.egit.core.synchronize.GitCommitsModelCache.CHANGE; +import static org.eclipse.egit.core.synchronize.GitCommitsModelCache.DELETION; +import static org.eclipse.egit.core.synchronize.GitCommitsModelCache.LEFT; +import static org.eclipse.egit.core.synchronize.GitCommitsModelCache.RIGHT; import static org.eclipse.jgit.junit.JGitTestUtil.deleteTrashFile; import static org.eclipse.jgit.junit.JGitTestUtil.writeTrashFile; import static org.eclipse.jgit.lib.ObjectId.zeroId; diff --git a/org.eclipse.egit.core/META-INF/MANIFEST.MF b/org.eclipse.egit.core/META-INF/MANIFEST.MF index a77fd61c73..efc69bae52 100644 --- a/org.eclipse.egit.core/META-INF/MANIFEST.MF +++ b/org.eclipse.egit.core/META-INF/MANIFEST.MF @@ -8,7 +8,6 @@ Bundle-Vendor: %provider_name Bundle-Localization: plugin Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)", org.eclipse.team.core;bundle-version="[3.4.0,4.0.0)", - org.eclipse.compare;bundle-version="[3.4.0,4.0.0)", org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)", org.eclipse.core.filesystem;bundle-version="[1.2.0,2.0.0)", org.eclipse.equinox.security;bundle-version="[1.0.0,2.0.0)" 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; } } diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/StagedChangeCache.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/StagedChangeCache.java index 9c8cb27def..5aa5254e7c 100644 --- a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/StagedChangeCache.java +++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/StagedChangeCache.java @@ -8,7 +8,7 @@ *******************************************************************************/ package org.eclipse.egit.core.synchronize; -import static org.eclipse.compare.structuremergeviewer.Differencer.RIGHT; +import static org.eclipse.egit.core.synchronize.GitCommitsModelCache.RIGHT; import static org.eclipse.egit.core.synchronize.GitCommitsModelCache.calculateAndSetChangeKind; import static org.eclipse.jgit.lib.Constants.HEAD; import static org.eclipse.jgit.lib.FileMode.MISSING; diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/WorkingTreeChangeCache.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/WorkingTreeChangeCache.java index 5bc03a06ba..45135b1fe1 100644 --- a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/WorkingTreeChangeCache.java +++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/WorkingTreeChangeCache.java @@ -8,7 +8,7 @@ *******************************************************************************/ package org.eclipse.egit.core.synchronize; -import static org.eclipse.compare.structuremergeviewer.Differencer.RIGHT; +import static org.eclipse.egit.core.synchronize.GitCommitsModelCache.RIGHT; import static org.eclipse.egit.core.synchronize.GitCommitsModelCache.calculateAndSetChangeKind; import static org.eclipse.jgit.treewalk.filter.TreeFilter.ANY_DIFF; |