public class MergeSessionCompareInput extends java.lang.Object implements IMergeSessionCompareInput
| Modifier and Type | Field and Description |
|---|---|
protected org.eclipse.compare.ITypedElement |
_ancestor
Ancestor element of this input
|
protected org.eclipse.compare.ITypedElement |
_left
Left element of this input
|
protected org.eclipse.compare.ITypedElement |
_right
Right element of this input
|
protected MergeSessionInfo |
_sessionInfo
Merge session info for this compare input
|
| Constructor and Description |
|---|
MergeSessionCompareInput(MergeSessionInfo info)
Constructs a new MergeSessionCompareInput
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener listener)
Adds a CompareInputChangeListener.
|
void |
copy(boolean leftToRight)
Copies the content of one contributor to another
|
protected static org.eclipse.compare.IStreamContentAccessor |
createEmptyContentAccessor() |
static IInputOutputDescriptor |
createInputDescriptor(java.lang.String label,
org.eclipse.swt.graphics.Image icon,
org.eclipse.compare.ITypedElement element)
Utility function used to create INPUT IInputOutputDescriptor from
ITypedElement.
|
static IInputOutputDescriptor |
createOutputDescriptor(java.lang.String label,
org.eclipse.swt.graphics.Image icon,
org.eclipse.compare.ITypedElement element)
Utility function used to create OUTPUT IInputOutputDescriptor from
ITypedElement.
|
protected java.lang.String[] |
formatPaths(java.lang.String[] paths)
Transforms the incoming paths into a predefined format
|
static IMergeSessionCompareInput |
generateInput(org.eclipse.compare.structuremergeviewer.ICompareInput compareInput,
org.eclipse.compare.CompareConfiguration config)
Generates a MergeSessionCompareInput from arbitrary ICompareInput.
|
static IMergeSessionCompareInput |
generateInput(org.eclipse.compare.structuremergeviewer.ICompareInput compareInput,
org.eclipse.compare.CompareConfiguration config,
boolean isSilent) |
org.eclipse.compare.ITypedElement |
getAncestor()
Retrieves the ancestor's ITypedElement
|
org.eclipse.swt.graphics.Image |
getImage()
Retrieves the image that is associated withthis compare merge input.
|
int |
getKind()
Returns the kind of this merge session compare input.
|
org.eclipse.compare.ITypedElement |
getLeft()
Retrieves the left contributor's ITypedElement
|
java.lang.String |
getName()
Retrieves the name of this compare merge input.
|
org.eclipse.compare.ITypedElement |
getRight()
Retrieves the right contributor's ITypedElement
|
MergeSessionInfo |
getSessionInfo()
Retrieves the associated merge session info.
|
void |
removeCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener listener)
Removes an attached CompareInputChangeListener.
|
protected MergeSessionInfo _sessionInfo
protected org.eclipse.compare.ITypedElement _ancestor
protected org.eclipse.compare.ITypedElement _left
protected org.eclipse.compare.ITypedElement _right
public MergeSessionCompareInput(MergeSessionInfo info)
info - holding all session-related informationpublic MergeSessionInfo getSessionInfo()
IMergeSessionCompareInputgetSessionInfo in interface IMergeSessionCompareInputpublic java.lang.String getName()
getName in interface org.eclipse.compare.structuremergeviewer.ICompareInputICompareInput.getName()public org.eclipse.swt.graphics.Image getImage()
getImage in interface org.eclipse.compare.structuremergeviewer.ICompareInputICompareInput.getImage()public int getKind()
getKind in interface org.eclipse.compare.structuremergeviewer.ICompareInputICompareInput.getKind()public org.eclipse.compare.ITypedElement getAncestor()
getAncestor in interface org.eclipse.compare.structuremergeviewer.ICompareInputICompareInput.getAncestor()public org.eclipse.compare.ITypedElement getLeft()
getLeft in interface org.eclipse.compare.structuremergeviewer.ICompareInputICompareInput.getLeft()public org.eclipse.compare.ITypedElement getRight()
getRight in interface org.eclipse.compare.structuremergeviewer.ICompareInputICompareInput.getRight()public void addCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener listener)
addCompareInputChangeListener in interface org.eclipse.compare.structuremergeviewer.ICompareInputICompareInput.addCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener)public void removeCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener listener)
removeCompareInputChangeListener in interface org.eclipse.compare.structuremergeviewer.ICompareInputICompareInput.removeCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener)public void copy(boolean leftToRight)
copy in interface org.eclipse.compare.structuremergeviewer.ICompareInputleftToRight - if true, copy content from left contributor to right.
Otherwise, false.ICompareInput.copy(boolean)protected java.lang.String[] formatPaths(java.lang.String[] paths)
paths - incoming paths that need formattingpublic static IMergeSessionCompareInput generateInput(org.eclipse.compare.structuremergeviewer.ICompareInput compareInput, org.eclipse.compare.CompareConfiguration config)
compareInput - as sourceconfig - that holds additional information, such as labels etc.public static IMergeSessionCompareInput generateInput(org.eclipse.compare.structuremergeviewer.ICompareInput compareInput, org.eclipse.compare.CompareConfiguration config, boolean isSilent)
public static IInputOutputDescriptor createInputDescriptor(java.lang.String label, org.eclipse.swt.graphics.Image icon, org.eclipse.compare.ITypedElement element)
label - label for the IInputOutputDescriptoricon - icon for the IInputOutputDescriptorelement - typed element used to create IInputOutputDescriptorpublic static IInputOutputDescriptor createOutputDescriptor(java.lang.String label, org.eclipse.swt.graphics.Image icon, org.eclipse.compare.ITypedElement element)
label - label for the IInputOutputDescriptoricon - icon for the IInputOutputDescriptorelement - typed element used to create IInputOutputDescriptorprotected static org.eclipse.compare.IStreamContentAccessor createEmptyContentAccessor()