diff options
Diffstat (limited to 'plugins/org.eclipse.emf.cdo/src/org/eclipse')
5 files changed, 44 insertions, 9 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOViewRegistry.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOViewRegistry.java index 017650e910..f94573035f 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOViewRegistry.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOViewRegistry.java @@ -26,25 +26,51 @@ import org.eclipse.net4j.util.container.IContainer; */ public interface CDOViewRegistry extends IContainer<Registration> { + /** + * The {@link ClassLoader class loader}-wide singleton instance of the {@link CDOViewRegistry view registry}. + */ public static final CDOViewRegistry INSTANCE = org.eclipse.emf.internal.cdo.view.CDOViewRegistryImpl.INSTANCE; + /** + * A symbolic constant returned from {@link #getID(CDOView)} if the view is not registered. + */ public static final int NOT_REGISTERED = 0; + /** + * Returns the {@link Registration#getID() IDs} of all registered {@link CDOView views}. + */ public int[] getIDs(); + /** + * Returns all registered {@link CDOView views}. + */ public CDOView[] getViews(); + /** + * Returns the {@link Registration#getID() ID} of the given {@link CDOView view} if it is registered, {@value #NOT_REGISTERED} otherwise. + */ public int getID(CDOView view); + /** + * Returns the {@link CDOView view} with the given {@link Registration#getID() ID} if it is registered, <code>null</code> otherwise. + */ public CDOView getView(int id); /** + * A bidirectional mapping between a registered {@link CDOView view} and its {@link ClassLoader class loader}-wide {@link #getID() ID}. + * * @author Eike Stepper */ public interface Registration { + /** + * Returns the ID of this registration. + */ public int getID(); + /** + * Returns the {@link CDOView} of this registration. + */ public CDOView getView(); } } diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java index c5e1a44656..ee24d8934f 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java @@ -1259,7 +1259,8 @@ public abstract class CDOSessionImpl extends CDOTransactionContainerImpl impleme return CDORevisionUtil.createChangeSetData(ids, sourceInfo, targetInfo); } - public MergeData getMergeData(CDOBranchPoint target, CDOBranchPoint source, CDOBranchPoint sourceBase) + public MergeData getMergeData(CDOBranchPoint target, CDOBranchPoint source, CDOBranchPoint sourceBase, + boolean computeChangeSets) { CDOBranchPoint ancestor = CDOBranchUtil.getAncestor(target, source); @@ -1283,8 +1284,13 @@ public abstract class CDOSessionImpl extends CDOTransactionContainerImpl impleme baseInfo = ancestorInfo; } - CDOChangeSet targetChanges = createChangeSet(ids, ancestorInfo, targetInfo); - CDOChangeSet sourceChanges = createChangeSet(ids, baseInfo, sourceInfo); + CDOChangeSet targetChanges = null; + CDOChangeSet sourceChanges = null; + if (computeChangeSets) + { + targetChanges = createChangeSet(ids, ancestorInfo, targetInfo); + sourceChanges = createChangeSet(ids, baseInfo, sourceInfo); + } return new MergeData(target, source, sourceBase, ancestor, targetInfo, sourceInfo, baseInfo, ancestorInfo, ids, targetChanges, sourceChanges); diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java index 900ccea9a7..6cc8623715 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java @@ -470,7 +470,7 @@ public class CDOTransactionImpl extends CDOViewImpl implements InternalCDOTransa } InternalCDOSession session = getSession(); - MergeData mergeData = session.getMergeData(target, source, sourceBase); + MergeData mergeData = session.getMergeData(target, source, sourceBase, true); CDOChangeSet targetChanges = mergeData.getTargetChanges(); CDOChangeSet sourceChanges = mergeData.getSourceChanges(); diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOSessionProtocol.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOSessionProtocol.java index 28cd187827..bf5c98e9bf 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOSessionProtocol.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOSessionProtocol.java @@ -143,7 +143,7 @@ public interface CDOSessionProtocol extends CDOProtocol, PackageLoader, BranchLo /** * @since 4.0 - * @deprecated Not called anymore. Use {@link CDOSessionProtocol#lockObjects2(List, int, CDOBranch, LockType, boolean, long)} instead. + * @deprecated Not called anymore. Use {@link #lockObjects2(List, int, CDOBranch, LockType, boolean, long)} instead. */ @Deprecated public LockObjectsResult lockObjects(List<InternalCDORevision> viewedRevisions, int viewID, CDOBranch viewedBranch, @@ -163,7 +163,7 @@ public interface CDOSessionProtocol extends CDOProtocol, PackageLoader, BranchLo /** * @since 3.0 - * @deprecated Not called anymore. Use {@link CDOSessionProtocol#unlockObjects2(CDOView, Collection, LockType, boolean)} instead. + * @deprecated Not called anymore. Use {@link #unlockObjects2(CDOView, Collection, LockType, boolean)} instead. */ @Deprecated public void unlockObjects(CDOView view, Collection<CDOID> objectIDs, LockType lockType); @@ -202,7 +202,7 @@ public interface CDOSessionProtocol extends CDOProtocol, PackageLoader, BranchLo /** * @since 4.0 - * @deprecated Not called anymore. Use {@link CDOSessionProtocol#commitTransaction(InternalCDOCommitContext, OMMonitor)} instead. + * @deprecated Not called anymore. Use {@link #commitTransaction(InternalCDOCommitContext, OMMonitor)} instead. */ @Deprecated public CommitTransactionResult commitTransaction(int transactionID, String comment, boolean releaseLocks, @@ -215,7 +215,7 @@ public interface CDOSessionProtocol extends CDOProtocol, PackageLoader, BranchLo /** * @since 4.0 - * @deprecated Not called anymore. Use {@link CDOSessionProtocol#commitDelegation(InternalCDOCommitContext, OMMonitor)} instead. + * @deprecated Not called anymore. Use {@link #commitDelegation(InternalCDOCommitContext, OMMonitor)} instead. */ @Deprecated public CommitTransactionResult commitDelegation(CDOBranch branch, String userID, String comment, diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOSession.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOSession.java index c6a693cf8f..4b8e402640 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOSession.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOSession.java @@ -256,9 +256,12 @@ public interface InternalCDOSession extends CDOSession, PackageProcessor, Packag /** * @since 4.2 */ - public MergeData getMergeData(CDOBranchPoint target, CDOBranchPoint source, CDOBranchPoint sourceBase); + public MergeData getMergeData(CDOBranchPoint target, CDOBranchPoint source, CDOBranchPoint sourceBase, + boolean computeChangeSets); /** + * A data structure that holds all input and output values of {@link InternalCDOSession#getMergeData(CDOBranchPoint, CDOBranchPoint, CDOBranchPoint, boolean) InternalCDOSession.getMergeData()}. + * * @author Eike Stepper * @since 4.2 */ |