diff options
author | Eike Stepper | 2011-08-29 07:46:11 +0000 |
---|---|---|
committer | Eike Stepper | 2011-08-29 07:46:11 +0000 |
commit | 2a7f4fb49c863c5c52d092b8b7c1faa23bef33bf (patch) | |
tree | c3e71fc474c59b536117b388143c76381194b099 /plugins/org.eclipse.emf.cdo.common | |
parent | cac3c0ef7e7cb257acedccc19c8f3352c8411201 (diff) | |
download | cdo-2a7f4fb49c863c5c52d092b8b7c1faa23bef33bf.tar.gz cdo-2a7f4fb49c863c5c52d092b8b7c1faa23bef33bf.tar.xz cdo-2a7f4fb49c863c5c52d092b8b7c1faa23bef33bf.zip |
[356049] CDOWorkspace.merge() is broken
https://bugs.eclipse.org/bugs/show_bug.cgi?id=356049
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.common')
5 files changed, 33 insertions, 2 deletions
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOChangeSetData.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOChangeSetData.java index c49728e6a9..98f2cfe947 100644 --- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOChangeSetData.java +++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOChangeSetData.java @@ -11,12 +11,14 @@ package org.eclipse.emf.cdo.common.commit; import org.eclipse.emf.cdo.common.branch.CDOBranchVersion; +import org.eclipse.emf.cdo.common.id.CDOID; import org.eclipse.emf.cdo.common.revision.CDOIDAndVersion; import org.eclipse.emf.cdo.common.revision.CDORevision; import org.eclipse.emf.cdo.common.revision.CDORevisionKey; import org.eclipse.emf.cdo.common.revision.delta.CDORevisionDelta; import java.util.List; +import java.util.Map; /** * A {@link CDOChangeKindProvider change kind provider} with detailed information about {@link #getNewObjects() new}, @@ -68,4 +70,9 @@ public interface CDOChangeSetData extends CDOChangeKindProvider * {@link CDOBranchVersion#UNSPECIFIED_VERSION unspecified}. */ public List<CDOIDAndVersion> getDetachedObjects(); + + /** + * @since 4.1 + */ + public Map<CDOID, CDOChangeKind> getChangeKinds(); } diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOChangeSetDataImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOChangeSetDataImpl.java index 37cbdb45b2..a06a6e231a 100644 --- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOChangeSetDataImpl.java +++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOChangeSetDataImpl.java @@ -192,14 +192,19 @@ public class CDOChangeSetDataImpl implements CDOChangeSetData return detachedObjects; } - public synchronized CDOChangeKind getChangeKind(CDOID id) + public synchronized Map<CDOID, CDOChangeKind> getChangeKinds() { if (changeKindCache == null) { changeKindCache = new CDOChangeKindCache(this); } - return changeKindCache.getChangeKind(id); + return changeKindCache; + } + + public CDOChangeKind getChangeKind(CDOID id) + { + return getChangeKinds().get(id); } @Override diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitInfoImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitInfoImpl.java index 5d39e62ce9..790b368b24 100644 --- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitInfoImpl.java +++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitInfoImpl.java @@ -27,6 +27,7 @@ import org.eclipse.net4j.util.CheckUtil; import java.text.MessageFormat; import java.util.List; +import java.util.Map; /** * @author Eike Stepper @@ -115,6 +116,12 @@ public class CDOCommitInfoImpl extends CDOBranchPointImpl implements CDOCommitIn return commitData.getDetachedObjects(); } + public Map<CDOID, CDOChangeKind> getChangeKinds() + { + loadCommitDataIfNeeded(); + return commitData.getChangeKinds(); + } + public CDOChangeKind getChangeKind(CDOID id) { loadCommitDataIfNeeded(); diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/DelegatingCommitInfo.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/DelegatingCommitInfo.java index f8df974a88..0fe5f7ff03 100644 --- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/DelegatingCommitInfo.java +++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/DelegatingCommitInfo.java @@ -21,6 +21,7 @@ import org.eclipse.emf.cdo.common.revision.CDOIDAndVersion; import org.eclipse.emf.cdo.common.revision.CDORevisionKey; import java.util.List; +import java.util.Map; /** * @author Eike Stepper @@ -88,6 +89,11 @@ public abstract class DelegatingCommitInfo implements CDOCommitInfo return getDelegate().getDetachedObjects(); } + public Map<CDOID, CDOChangeKind> getChangeKinds() + { + return getDelegate().getChangeKinds(); + } + public CDOChangeKind getChangeKind(CDOID id) { return getDelegate().getChangeKind(id); diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/FailureCommitInfo.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/FailureCommitInfo.java index a97a77fb40..32809d76c3 100644 --- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/FailureCommitInfo.java +++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/FailureCommitInfo.java @@ -22,6 +22,7 @@ import org.eclipse.emf.cdo.common.revision.CDORevisionKey; import java.util.Collections; import java.util.List; +import java.util.Map; /** * @author Eike Stepper @@ -93,6 +94,11 @@ public class FailureCommitInfo implements CDOCommitInfo return Collections.emptyList(); } + public Map<CDOID, CDOChangeKind> getChangeKinds() + { + return Collections.emptyMap(); + } + public CDOChangeKind getChangeKind(CDOID id) { return null; |