public class DiffMergeModelContextImpl extends ViewModelContextImpl implements DiffMergeModelContext
ViewModelContextImpl
.
As the ViewModelContextImpl
is internal we suppress the restriction.Constructor and Description |
---|
DiffMergeModelContextImpl(VElement view,
org.eclipse.emf.ecore.EObject domainObject,
org.eclipse.emf.ecore.EObject left,
org.eclipse.emf.ecore.EObject right)
Constructor for the
DiffMergeModelContextImpl . |
DiffMergeModelContextImpl(VElement view,
org.eclipse.emf.ecore.EObject domainObject,
org.eclipse.emf.ecore.EObject left,
org.eclipse.emf.ecore.EObject right,
Set<VDomainModelReference> mergedReferences)
Constructor for the
DiffMergeModelContextImpl . |
DiffMergeModelContextImpl(VElement view,
org.eclipse.emf.ecore.EObject domainObject,
org.eclipse.emf.ecore.EObject origin1,
org.eclipse.emf.ecore.EObject origin2,
Set<VDomainModelReference> mergedReferences,
ViewModelService... modelServices)
Constructor for the
DiffMergeModelContextImpl . |
DiffMergeModelContextImpl(VElement view,
org.eclipse.emf.ecore.EObject domainObject,
org.eclipse.emf.ecore.EObject origin1,
org.eclipse.emf.ecore.EObject origin2,
ViewModelService... modelServices)
Constructor for the
DiffMergeModelContextImpl . |
Modifier and Type | Method and Description |
---|---|
VControl |
getControl(int diffIndex)
Returns the control based on the diff index.
|
int |
getIndexOf(VControl control)
Returns the diff index of a control.
|
org.eclipse.emf.ecore.EObject |
getLeftModel()
Gets the left model.
|
Set<VDomainModelReference> |
getMergedDomainObjects()
Returns the set of domainModelReferences which are merged.
|
ControlPair |
getPairWithDiff(VControl control)
Returns a pair containing the left and right control for the diff.
|
org.eclipse.emf.ecore.EObject |
getRightModel()
Gets the right model.
|
int |
getTotalNumberOfDiffs()
Returns the total number of differences.
|
protected Set<VControl> |
getValidMergeControls(Set<VControl> controls)
Filter for valid controls.
|
boolean |
hasDiff(VControl control)
Checks whether a control has a diff.
|
protected boolean |
hasDiff(VControl leftControl,
org.eclipse.emf.ecore.EObject leftDomainModel,
VControl rightControl,
org.eclipse.emf.ecore.EObject rightDomainModel,
VControl targetControl)
Checks whether the controls have a diff.
|
boolean |
isControlMerged(VControl vControl)
Returns true if the control already was merged or doesn't have a difference at all.
|
void |
markControl(VControl vControl,
boolean merged)
Mark a control as merged.
|
addContextUser, changeDomainModel, dispose, getChildContext, getChildContext, getContextValue, getControlsFor, getControlsFor, getDomainModel, getParentContext, getParentVElement, getService, getServiceWithoutLog, getViewModel, getViewModelServiceProvider, hasService, putContextValue, registerDisposeListener, registerDomainChangeListener, registerEMFFormsContextListener, registerRootDomainModelChangeListener, registerViewChangeListener, removeContextUser, unregisterDomainChangeListener, unregisterEMFFormsContextListener, unregisterRootDomainModelChangeListener, unregisterViewChangeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addContextUser, dispose, getChildContext, getChildContext, getContextValue, getControlsFor, getControlsFor, getDomainModel, getParentContext, getParentVElement, getService, getViewModel, hasService, putContextValue, registerDisposeListener, registerDomainChangeListener, registerViewChangeListener, removeContextUser, unregisterDomainChangeListener, unregisterViewChangeListener
changeDomainModel, registerEMFFormsContextListener, registerRootDomainModelChangeListener, unregisterEMFFormsContextListener, unregisterRootDomainModelChangeListener
public DiffMergeModelContextImpl(VElement view, org.eclipse.emf.ecore.EObject domainObject, org.eclipse.emf.ecore.EObject left, org.eclipse.emf.ecore.EObject right)
DiffMergeModelContextImpl
.view
- the VElement
domainObject
- the EObject
which is editableleft
- the first objectright
- the second objectViewModelContextImpl.ViewModelContextImpl(VElement, EObject)
public DiffMergeModelContextImpl(VElement view, org.eclipse.emf.ecore.EObject domainObject, org.eclipse.emf.ecore.EObject left, org.eclipse.emf.ecore.EObject right, Set<VDomainModelReference> mergedReferences)
DiffMergeModelContextImpl
.view
- the VElement
domainObject
- the EObject
which is editableleft
- the first objectright
- the second objectmergedReferences
- the set of already merged domain referencesViewModelContextImpl.ViewModelContextImpl(VElement, EObject)
public DiffMergeModelContextImpl(VElement view, org.eclipse.emf.ecore.EObject domainObject, org.eclipse.emf.ecore.EObject origin1, org.eclipse.emf.ecore.EObject origin2, ViewModelService... modelServices)
DiffMergeModelContextImpl
.view
- the VElement
domainObject
- the EObject
which is editableorigin1
- the first objectorigin2
- the second objectmodelServices
- the ViewModelServices
to registerViewModelContextImpl.ViewModelContextImpl(VElement, EObject, ViewModelService...)
public DiffMergeModelContextImpl(VElement view, org.eclipse.emf.ecore.EObject domainObject, org.eclipse.emf.ecore.EObject origin1, org.eclipse.emf.ecore.EObject origin2, Set<VDomainModelReference> mergedReferences, ViewModelService... modelServices)
DiffMergeModelContextImpl
.view
- the VElement
domainObject
- the EObject
which is editableorigin1
- the first objectorigin2
- the second objectmergedReferences
- the set of already merged domain referencesmodelServices
- the ViewModelServices
to registerViewModelContextImpl.ViewModelContextImpl(VElement, EObject, ViewModelService...)
protected Set<VControl> getValidMergeControls(Set<VControl> controls)
controls
- the controls to validateprotected boolean hasDiff(VControl leftControl, org.eclipse.emf.ecore.EObject leftDomainModel, VControl rightControl, org.eclipse.emf.ecore.EObject rightDomainModel, VControl targetControl)
leftControl
- the left control to checkleftDomainModel
- The domain model of the left controlrightControl
- the right control to checkrightDomainModel
- The domain model of the right controltargetControl
- the target control to checkpublic org.eclipse.emf.ecore.EObject getLeftModel()
getLeftModel
in interface DiffMergeModelContext
public org.eclipse.emf.ecore.EObject getRightModel()
getRightModel
in interface DiffMergeModelContext
public boolean hasDiff(VControl control)
hasDiff
in interface DiffMergeModelContext
control
- the VControl
to checkDiffMergeModelContext.hasDiff(org.eclipse.emf.ecp.view.spi.model.VControl)
public ControlPair getPairWithDiff(VControl control)
getPairWithDiff
in interface DiffMergeModelContext
control
- the control to get the pair forDiffMergeModelContext.getPairWithDiff(org.eclipse.emf.ecp.view.spi.model.VControl)
public int getTotalNumberOfDiffs()
getTotalNumberOfDiffs
in interface DiffMergeModelContext
DiffMergeModelContext.getTotalNumberOfDiffs()
public int getIndexOf(VControl control)
getIndexOf
in interface DiffMergeModelContext
control
- the VControl
to get the index forDiffMergeModelContext.getIndexOf(org.eclipse.emf.ecp.view.spi.model.VControl)
public VControl getControl(int diffIndex) throws IllegalArgumentException
IllegalArgumentException
will be thrown.getControl
in interface DiffMergeModelContext
diffIndex
- the diff index to get the control forVControl
IllegalArgumentException
- thrown if the index is invalidDiffMergeModelContext.getControl(int)
public boolean isControlMerged(VControl vControl)
isControlMerged
in interface DiffMergeModelContext
vControl
- the VControl
to checkDiffMergeModelContext.isControlMerged(org.eclipse.emf.ecp.view.spi.model.VControl)
public void markControl(VControl vControl, boolean merged)
markControl
in interface DiffMergeModelContext
vControl
- the VControl
to be mergedmerged
- true if control is merged, false otherwiseDiffMergeModelContext.markControl(org.eclipse.emf.ecp.view.spi.model.VControl,
boolean)
public Set<VDomainModelReference> getMergedDomainObjects()
getMergedDomainObjects
in interface DiffMergeModelContext
VDomainModelReferences
DiffMergeModelContext.getMergedDomainObjects()
Copyright © 2019. All rights reserved.