|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.compare.ui.ModelCompareInput
public class ModelCompareInput
Input to be used for a 2 or 3-way comparison in a
ModelContentMergeViewer
.
Constructor Summary | |
---|---|
ModelCompareInput(MatchModel matchModel,
DiffModel diffModel)
Creates a CompareInput given the resulting match and diff of the comparison. |
|
ModelCompareInput(MatchModel matchModel,
DiffModel diffModel,
ICompareInputDetailsProvider provider)
Creates a CompareInput given the resulting match and diff of the comparison. |
|
ModelCompareInput(MatchResourceSet matchResourceset,
DiffResourceSet diffResourceSet)
Creates a CompareInput given the resulting match and diff of the comparison. |
|
ModelCompareInput(MatchResourceSet matchResourceset,
DiffResourceSet diffResourceSet,
ICompareInputDetailsProvider provider)
Creates a CompareInput given the resulting match and diff of the comparison. |
Method Summary | |
---|---|
void |
addCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener listener)
|
void |
copy(boolean leftToRight)
|
void |
copy(DiffElement element,
boolean leftToRight)
Copies a single DiffElement or a DiffGroup in the given direction. |
void |
copy(java.util.List<DiffElement> elements,
boolean leftToRight)
Copies a list of DiffElement s or DiffGroup s in the given direction. |
protected void |
doCopy(DiffElement element,
boolean leftToRight)
Applies the changes implied by a given DiffElement in the direction specified by
leftToRight . |
protected void |
doCopy(java.util.List<DiffElement> elements,
boolean leftToRight)
Applies the changes implied by a list of DiffElement in the direction specified by
leftToRight . |
protected void |
fireCompareInputChanged()
Notifies all listeners registered for this
input that a change occured. |
org.eclipse.compare.ITypedElement |
getAncestor()
|
org.eclipse.emf.ecore.resource.Resource |
getAncestorResource()
Returns the left resource of this input. |
java.lang.Object |
getDiff()
Returns this ModelCompareInput's DiffModel. |
java.util.List<DiffElement> |
getDiffAsList()
Returns the DiffElement of the input DiffModel as a list. |
org.eclipse.swt.graphics.Image |
getImage()
|
int |
getKind()
|
org.eclipse.compare.ITypedElement |
getLeft()
|
org.eclipse.emf.ecore.resource.Resource |
getLeftResource()
Returns the left resource of this input. |
java.lang.Object |
getMatch()
Returns this ModelCompareInput's MatchModel. |
java.lang.String |
getName()
|
org.eclipse.compare.ITypedElement |
getRight()
|
org.eclipse.emf.ecore.resource.Resource |
getRightResource()
Returns the left resource of this input. |
void |
removeCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener listener)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ModelCompareInput(MatchModel matchModel, DiffModel diffModel)
match
and diff
of the comparison.
matchModel
- match
of the comparison.diffModel
- diff
of the comparison.public ModelCompareInput(MatchResourceSet matchResourceset, DiffResourceSet diffResourceSet)
match
and diff
of the comparison.
matchResourceset
- match
of the comparison.diffResourceSet
- diff
of the comparison.public ModelCompareInput(MatchModel matchModel, DiffModel diffModel, ICompareInputDetailsProvider provider)
match
and diff
of the comparison.
matchModel
- match
of the comparison.diffModel
- diff
of the comparison.provider
- The input provider which has been used for this comparison.public ModelCompareInput(MatchResourceSet matchResourceset, DiffResourceSet diffResourceSet, ICompareInputDetailsProvider provider)
match
and diff
of the comparison.
matchResourceset
- match
of the comparison.diffResourceSet
- diff
of the comparison.provider
- The input provider which has been used for this comparison.Method Detail |
---|
public void addCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener listener)
addCompareInputChangeListener
in interface org.eclipse.compare.structuremergeviewer.ICompareInput
ICompareInput.addCompareInputChangeListener(ICompareInputChangeListener)
public void copy(boolean leftToRight)
copy
in interface org.eclipse.compare.structuremergeviewer.ICompareInput
ICompareInput.copy(boolean)
public void copy(DiffElement element, boolean leftToRight)
DiffElement
or a DiffGroup
in the given direction.
element
- Element
to copy.leftToRight
- Direction of the copy.public void copy(java.util.List<DiffElement> elements, boolean leftToRight)
DiffElement
s or DiffGroup
s in the given direction.
elements
- Element
s to copy.leftToRight
- Direction of the copy.public org.eclipse.compare.ITypedElement getAncestor()
getAncestor
in interface org.eclipse.compare.structuremergeviewer.ICompareInput
ICompareInput.getAncestor()
public org.eclipse.emf.ecore.resource.Resource getAncestorResource()
public java.lang.Object getDiff()
public java.util.List<DiffElement> getDiffAsList()
DiffElement
of the input DiffModel
as a list. Doesn't take
DiffGroup
s into account.
DiffElement
of the input DiffModel
as a list.public org.eclipse.swt.graphics.Image getImage()
getImage
in interface org.eclipse.compare.structuremergeviewer.ICompareInput
ICompareInput.getImage()
public int getKind()
getKind
in interface org.eclipse.compare.structuremergeviewer.ICompareInput
ICompareInput.getKind()
public org.eclipse.compare.ITypedElement getLeft()
getLeft
in interface org.eclipse.compare.structuremergeviewer.ICompareInput
ICompareInput.getLeft()
public org.eclipse.emf.ecore.resource.Resource getLeftResource()
public java.lang.Object getMatch()
public java.lang.String getName()
getName
in interface org.eclipse.compare.structuremergeviewer.ICompareInput
ICompareInput.getName()
public org.eclipse.compare.ITypedElement getRight()
getRight
in interface org.eclipse.compare.structuremergeviewer.ICompareInput
ICompareInput.getRight()
public org.eclipse.emf.ecore.resource.Resource getRightResource()
public void removeCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener listener)
removeCompareInputChangeListener
in interface org.eclipse.compare.structuremergeviewer.ICompareInput
ICompareInput.removeCompareInputChangeListener(ICompareInputChangeListener)
protected void doCopy(DiffElement element, boolean leftToRight)
DiffElement
in the direction specified by
leftToRight
.
element
- DiffElement
containing the copy information.leftToRight
- True
if the changes must be applied from the left to the right model,
False
otherwise.protected void doCopy(java.util.List<DiffElement> elements, boolean leftToRight)
DiffElement
in the direction specified by
leftToRight
.
elements
- DiffElement
s containing the copy information.leftToRight
- True
if the changes must be applied from the left to the right model,
False
otherwise.protected void fireCompareInputChanged()
listeners
registered for this
input
that a change occured.
|
Copyright 2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |