Class SynchronizationModel
java.lang.Object
org.eclipse.emf.compare.ide.ui.logical.SynchronizationModel
- All Implemented Interfaces:
IDiagnosable
This class acts as a simple DTO that allows us to store the three traversals corresponding to the three
sides of a comparison while we build its scope.
- Since:
- 4.0
-
Constructor Summary
ConstructorDescriptionSynchronizationModel
(StorageTraversal leftTraversal, StorageTraversal rightTraversal, StorageTraversal originTraversal) Constructs our logical model given the three traversal for our sides.SynchronizationModel
(StorageTraversal leftTraversal, StorageTraversal rightTraversal, StorageTraversal originTraversal, Diagnostic diagnostic) Constructs our logical model given the three traversal for our sides. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Set<org.eclipse.core.resources.IResource>
Returns the all resources that are involved in this synchronization model.Returns the diagnostics that may have been issued for the synchronization model, as well as for the left, right, and origin side.Returns the left traversal of this model.Returns the origin traversal of this model, if any.Set<org.eclipse.core.resources.IResource>
Returns the set of resources this synchronization model spans.Returns the right traversal of this model.int
hashCode()
void
setDiagnostic
(Diagnostic diagnostic) Set the diagnostic to be associated with this scope.
-
Constructor Details
-
SynchronizationModel
public SynchronizationModel(StorageTraversal leftTraversal, StorageTraversal rightTraversal, StorageTraversal originTraversal) Constructs our logical model given the three traversal for our sides.- Parameters:
leftTraversal
- The traversal corresponding to the left side.rightTraversal
- The traversal corresponding to the right side.originTraversal
- The traversal corresponding to the common ancestor of both other side. Can benull
.
-
SynchronizationModel
public SynchronizationModel(StorageTraversal leftTraversal, StorageTraversal rightTraversal, StorageTraversal originTraversal, Diagnostic diagnostic) Constructs our logical model given the three traversal for our sides.- Parameters:
leftTraversal
- The traversal corresponding to the left side.rightTraversal
- The traversal corresponding to the right side.originTraversal
- The traversal corresponding to the common ancestor of both other side. Can benull
.diagnostic
- The diagnostic that have gathered during the computation of the traversals.
-
-
Method Details
-
getLeftTraversal
Returns the left traversal of this model.- Returns:
- The left traversal of this model.
-
getRightTraversal
Returns the right traversal of this model.- Returns:
- The right traversal of this model.
-
getOriginTraversal
Returns the origin traversal of this model, if any.- Returns:
- The origin traversal of this model,
null
if none.
-
getDiagnostic
Returns the diagnostics that may have been issued for the synchronization model, as well as for the left, right, and origin side.- Specified by:
getDiagnostic
in interfaceIDiagnosable
- Returns:
- The diagnostics of the synchronization model, left, right, and origin side.
-
setDiagnostic
Set the diagnostic to be associated with this scope.- Specified by:
setDiagnostic
in interfaceIDiagnosable
- Parameters:
diagnostic
- the diagnostic- See Also:
-
equals
-
hashCode
public int hashCode() -
getResources
Returns the set of resources this synchronization model spans.The returned set may contain resources that do not exist locally. The set of resources is cached. If no cached set is available, this method will compute and cache it. Note that the cache may not be in sync, if the traversals of this synchronization model have been changed after
getResources()
has been called.- Returns:
- The set of resources this synchronization model spans.
- Since:
- 4.1
-
getAllInvolvedResources
Returns the all resources that are involved in this synchronization model.This is the set of resources involved directly after the instantiation of this synchronization model and hence the set of resources before any minimization that may have been applied.
- Returns:
- The initial set of all resources this synchronization model spans.
- Since:
- 4.3
-