public final class CDOCompareUtil extends Object
comparisons
.
Two different scopes
are supported:
CDOComparisonScope.AllContents
takes an arbitrary object
(including resource nodes
)
and returns matches
for all elements of its content tree
. This scope has the advantage that the comparison can
be rooted at specific objects that are different from (below of) the root resource. The disadvantage is that all the transitive children of this specific object are
matched, whether they differ or not. Major parts of huge repositories can be loaded to the client side easily, if no attention is paid.
The following method returns comparisons that are based on this scope algorithm:
CDOComparisonScope.Minimal
takes a view
/transaction
and returns matches
only for the changed elements of the entire content tree of its root resource
.
The advantage of this scope is that CDO-specific mechanisms are used to efficiently (remotely) determine the set of changed objects. Only those and their container
objects are considered as matches, making this scope scale seamlessly with the overall size of a repository.
The following method returns comparisons that are based on this scope algorithm:
origin side
of a comparison is automatically determined
by
inspecting the branch tree
and used if its different from the left or right side.
The matcher
used by the comparisons is based on an ID function
that considers the CDOID
s of the objects
.
Resources
and folders
are treated as normal EObject
s.
Modifier and Type | Field and Description |
---|---|
static CDOViewOpener |
DEFAULT_VIEW_OPENER |
Modifier and Type | Method and Description |
---|---|
static org.eclipse.emf.compare.Comparison |
compare(CDOObject left,
CDOView rightView,
CDOView[] originView)
Takes an arbitrary
object (including resource nodes ) and returns matches for all elements of its content tree . |
static org.eclipse.emf.compare.Comparison |
compare(CDOObject left,
CDOView rightView,
CDOView[] originView,
CDOViewOpener viewOpener)
Takes an arbitrary
object (including resource nodes ) and returns matches for all elements of its content tree . |
static org.eclipse.emf.compare.Comparison |
compare(CDOView leftView,
CDOView rightView,
CDOView[] originView)
Takes a
view /transaction
and returns matches only for the changed elements of the entire content tree of its root resource . |
static org.eclipse.emf.compare.Comparison |
compare(CDOView leftView,
CDOView rightView,
CDOView[] originView,
CDOViewOpener viewOpener)
Takes a
view /transaction
and returns matches only for the changed elements of the entire content tree of its root resource . |
static org.eclipse.emf.compare.Comparison |
compare(CDOView leftView,
CDOView rightView,
CDOView[] originView,
Set<CDOID> ids) |
static org.eclipse.emf.compare.Comparison |
compare(CDOView leftView,
CDOView rightView,
CDOView[] originView,
Set<CDOID> ids,
CDOViewOpener viewOpener) |
static org.eclipse.emf.compare.Comparison |
compare(org.eclipse.emf.compare.scope.IComparisonScope scope) |
static org.eclipse.emf.compare.Comparison |
compareUncommittedChanges(CDOTransaction transaction) |
static org.eclipse.emf.compare.Comparison |
compareUncommittedChanges(CDOTransaction transaction,
CDOViewOpener viewOpener) |
public static final CDOViewOpener DEFAULT_VIEW_OPENER
public static org.eclipse.emf.compare.Comparison compare(org.eclipse.emf.compare.scope.IComparisonScope scope)
public static org.eclipse.emf.compare.Comparison compare(CDOObject left, CDOView rightView, CDOView[] originView)
object
(including resource nodes
) and returns matches
for all elements of its content tree
. This scope has the advantage that the comparison can
be rooted at specific objects that are different from (below of) the root resource. The disadvantage is that all the transitive children of this specific object are
matched, whether they differ or not. Major parts of huge repositories can be loaded to the client side easily, if no attention is paid.public static org.eclipse.emf.compare.Comparison compare(CDOObject left, CDOView rightView, CDOView[] originView, CDOViewOpener viewOpener)
object
(including resource nodes
) and returns matches
for all elements of its content tree
. This scope has the advantage that the comparison can
be rooted at specific objects that are different from (below of) the root resource. The disadvantage is that all the transitive children of this specific object are
matched, whether they differ or not. Major parts of huge repositories can be loaded to the client side easily, if no attention is paid.public static org.eclipse.emf.compare.Comparison compare(CDOView leftView, CDOView rightView, CDOView[] originView)
view
/transaction
and returns matches
only for the changed elements of the entire content tree of its root resource
.
The advantage of this scope is that CDO-specific mechanisms are used to efficiently (remotely) determine the set of changed objects. Only those and their container
objects are considered as matches, making this scope scale seamlessly with the overall size of a repository.public static org.eclipse.emf.compare.Comparison compare(CDOView leftView, CDOView rightView, CDOView[] originView, CDOViewOpener viewOpener)
view
/transaction
and returns matches
only for the changed elements of the entire content tree of its root resource
.
The advantage of this scope is that CDO-specific mechanisms are used to efficiently (remotely) determine the set of changed objects. Only those and their container
objects are considered as matches, making this scope scale seamlessly with the overall size of a repository.public static org.eclipse.emf.compare.Comparison compare(CDOView leftView, CDOView rightView, CDOView[] originView, Set<CDOID> ids)
public static org.eclipse.emf.compare.Comparison compare(CDOView leftView, CDOView rightView, CDOView[] originView, Set<CDOID> ids, CDOViewOpener viewOpener)
public static org.eclipse.emf.compare.Comparison compareUncommittedChanges(CDOTransaction transaction)
public static org.eclipse.emf.compare.Comparison compareUncommittedChanges(CDOTransaction transaction, CDOViewOpener viewOpener)
Copyright (c) 2011-2015 Eike Stepper (Berlin, Germany) and others.