public class EmfMergeController
extends AbstractStructureController
implements java.beans.PropertyChangeListener
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
INDENT |
| Constructor and Description |
|---|
EmfMergeController(EmfStructureMergeViewer viewer)
Constructs a new EmfMergeController
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canAutoAdvance()
Determines if the Auto-Advance action can be enabled.
|
protected boolean |
canSaveToLeftOrRight() |
void |
closeCompareMergeSession()
Close C/M session, if any.
|
protected void |
combine(java.util.List<Delta> allDeltas,
java.util.Set<Delta> leftDeltas,
java.util.Set<Delta> rightDeltas) |
protected void |
doSaveDeltas(java.lang.String toPath)
Deprecated.
|
protected void |
doSaveDeltas2(java.lang.String toPath)
Saves the rendered representation of deltas to a specified file path.
|
ICommand |
getAcceptAllCommand(java.lang.String label,
ContributorType contributor)
Returns the command accepting all Differences associated with the
specified contributor and applying them to the Merged model.
|
ICommand |
getAcceptAllNonconflictingCommand(java.lang.String label)
Returns the command for accepting all Non-Conflicting Diffs from both
contributors.
|
ICommand |
getAcceptCommand(java.lang.String label,
ContributorType contributor,
IContentViewerInput input)
Returns the command for accepting the specified contributor's difference
and applying it to the Merged model
If the Difference is a part of conflict, the Conflict will also be resolved, and the other conflicting Diff will be rejected. |
ICommand |
getAddAddConflictAcceptCommand(java.lang.String label,
IContentViewerInput input,
java.lang.Object mergedValue)
Returns the command for resolve the conflict with given custom value.
|
ICommand |
getChangeChangeConflictAcceptCommand(java.lang.String label,
IContentViewerInput input,
java.lang.Object customValue)
Returns the command for resolve the conflict with given custom value.
|
ICommand |
getChangeChangeConflictResetCommand(java.lang.String label,
IContentViewerInput input,
java.lang.Object customValue) |
IConflictRenderer |
getConflictRenderer()
Returns a conflict renderer.
|
org.eclipse.core.runtime.content.IContentType |
getContentType()
Returns content type for the controller.
|
IDifferenceRenderer |
getDifferenceRenderer()
Returns a difference renderer.
|
EmfMergeManager |
getEmfMergeManager()
Returns the EMF merge manager.
|
ICommand |
getIgnoreAllCommand(java.lang.String label)
Returns the command for ignoring ALL conflicts in the current
MergeSession.
|
ICommand |
getIgnoreCommand(java.lang.String label,
IContentViewerInput input)
Returns the command for Ignoring the Conflict.
|
ICommand |
getIgnoreGroupedConflictCommand(java.lang.String label,
IContentViewerInput input)
Constructs command to ignore the "Grouped Conflict" - an artificial
conflict consisting of several other conflicts.
|
java.lang.Object |
getProperty(java.lang.String key) |
ICommand |
getProxyCommand(java.lang.String label,
java.util.Collection emfCommands)
Returns a proxy command for the specified EMF commands
|
ICommand |
getRejectAllCommand(java.lang.String label,
ContributorType contributor)
Returns the command for rejecting ALL Differences from specified
contributor.
|
ICommand |
getRejectCommand(java.lang.String label,
ContributorType contributor,
IContentViewerInput input)
Returns the command for rejecting the specified contributor's Difference.
|
ICommand |
getResolveAllCommand(java.lang.String label,
ContributorType contributor)
Returns the command for resolving ALL Conflicts using the specified
contributor.
|
ICommand |
getResolveCommand(java.lang.String label,
ContributorType contributor,
IContentViewerInput input)
Returns the command for resolving the Conflict by accepting the
conflicting Difference from a specified Contributor
|
ICommand |
getResolveGroupedConflictCommand(java.lang.String label,
ContributorType contributor,
IContentViewerInput input)
Constructs command to resolve the "Grouped Conflict" - an artificial
conflict consisting of several other conflicts - with a given
contributor.
|
void |
propertyChange(java.beans.PropertyChangeEvent event)
This method is called from the EMF Compare/Merge back end when the Delta
or Conflict is resolved.
|
void |
saveMergedContributorAs(ContributorType contributor) |
void |
saveMergedContributorCopy() |
java.lang.String |
translateUnprintables(java.lang.String s)
Translates unprintable characters.
|
public static final java.lang.String INDENT
public EmfMergeController(EmfStructureMergeViewer viewer)
viewer - the associated EmfStructureMergeViewerpublic IDifferenceRenderer getDifferenceRenderer()
public IConflictRenderer getConflictRenderer()
public void closeCompareMergeSession()
com.ibm.xtools.comparemerge.ui.controller.ICompareMergeController#closeCompareMergeSession()public boolean canAutoAdvance()
com.ibm.xtools.comparemerge.ui.controller.ICompareMergeController#canAutoAdvance()public void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange in interface java.beans.PropertyChangeListenerPropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)public ICommand getAcceptCommand(java.lang.String label,
ContributorType contributor,
IContentViewerInput input)
label - for the new ICommand.contributor - the source contributor (for e.g.
ContributorType.LEFT) to accept the Difference
frominput - the compare merge input object that holds the Difference to be
acceptednull if nonecom.ibm.xtools.comparemerge.ui.controller.ICompareMergeController#getAcceptCommand(java.lang.String,
com.ibm.xtools.comparemerge.core.utils.ContributorType,
com.ibm.xtools.comparemerge.ui.controller.IContentViewerInput)public ICommand getAcceptAllCommand(java.lang.String label,
ContributorType contributor)
label - for the new ICommand.contributor - the source contributor (for e.g.
ContributorType.LEFT) to accept all Diffs
from.null if nonecom.ibm.xtools.comparemerge.ui.controller.ICompareMergeController#getAcceptAllCommand(java.lang.String,
com.ibm.xtools.comparemerge.core.utils.ContributorType)public ICommand getAcceptAllNonconflictingCommand(java.lang.String label)
null if nonecom.ibm.xtools.comparemerge.ui.controller.ICompareMergeController#getAcceptAllNonconflictingCommand(java.lang.String)protected void combine(java.util.List<Delta> allDeltas, java.util.Set<Delta> leftDeltas, java.util.Set<Delta> rightDeltas)
public ICommand getRejectCommand(java.lang.String label,
ContributorType contributor,
IContentViewerInput input)
label - for the new ICommand.contributor - the contributor (for e.g. ContributorType.LEFT)
to rejects the Difference frominput - the compare merge input object that holds the Difference to be
rejectednull if nonecom.ibm.xtools.comparemerge.ui.controller.ICompareMergeController#getRejectCommand(java.lang.String,
com.ibm.xtools.comparemerge.core.utils.ContributorType,
com.ibm.xtools.comparemerge.ui.controller.IContentViewerInput)public ICommand getRejectAllCommand(java.lang.String label,
ContributorType contributor)
label - for the new ICommand.contributor - to reject all Differences fromnull if nonecom.ibm.xtools.comparemerge.ui.controller.ICompareMergeController#getRejectAllCommand(java.lang.String,
com.ibm.xtools.comparemerge.core.utils.ContributorType)public ICommand getResolveCommand(java.lang.String label,
ContributorType contributor,
IContentViewerInput input)
label - for the new ICommand.contributor - to reject all Differences frominput - the compare merge input object that holds the Conflict to be
resolvednull if nonecom.ibm.xtools.comparemerge.ui.controller.ICompareMergeController#getResolveCommand(java.lang.String,
com.ibm.xtools.comparemerge.core.utils.ContributorType,
com.ibm.xtools.comparemerge.ui.controller.IContentViewerInput)public ICommand getResolveAllCommand(java.lang.String label,
ContributorType contributor)
label - for the new ICommand.contributor - to resolve all Conflicts withnull if nonecom.ibm.xtools.comparemerge.ui.controller.ICompareMergeController#getResolveAllCommand(java.lang.String,
com.ibm.xtools.comparemerge.core.utils.ContributorType)public ICommand getIgnoreCommand(java.lang.String label,
IContentViewerInput input)
label - for the new ICommand.input - the compare merge input object that holds the Conflict to be
ignorednull if nonecom.ibm.xtools.comparemerge.ui.controller.ICompareMergeController#getIgnoreCommand(java.lang.String,
com.ibm.xtools.comparemerge.ui.controller.IContentViewerInput)public ICommand getIgnoreAllCommand(java.lang.String label)
label - for the new ICommand.null if nonecom.ibm.xtools.comparemerge.ui.controller.ICompareMergeController#getIgnoreAllCommand(java.lang.String)public ICommand getIgnoreGroupedConflictCommand(java.lang.String label,
IContentViewerInput input)
input - -
the currently selected Grouped Conflictpublic ICommand getResolveGroupedConflictCommand(java.lang.String label,
ContributorType contributor,
IContentViewerInput input)
contributor - to resolve the conflict withinput - -
the currently selected Grouped Conflictpublic ICommand getProxyCommand(java.lang.String label,
java.util.Collection emfCommands)
label - the label for the proxy commandemfCommands - the collection of EMF commandspublic EmfMergeManager getEmfMergeManager()
protected void doSaveDeltas2(java.lang.String toPath)
throws java.io.IOException
toPath - the file path to save tojava.io.IOException - if i/o error occurred@Deprecated
protected void doSaveDeltas(java.lang.String toPath)
throws java.io.IOException
toPath - the file path to save tojava.io.IOException - if i/o error occurredpublic java.lang.String translateUnprintables(java.lang.String s)
s - --
string inpublic void saveMergedContributorCopy()
protected boolean canSaveToLeftOrRight()
public void saveMergedContributorAs(ContributorType contributor)
throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreExceptionpublic java.lang.Object getProperty(java.lang.String key)
public ICommand getChangeChangeConflictAcceptCommand(java.lang.String label,
IContentViewerInput input,
java.lang.Object customValue)
label - for the new ICommand.customValue - override value for the merge targetcom.ibm.xtools.comparemerge.ui.controller.ICompareMergeController#getChangeChangeConflictAcceptCommand(java.lang.String,
com.ibm.xtools.comparemerge.ui.controller.IContentViewerInput,
java.lang.Object)public ICommand getChangeChangeConflictResetCommand(java.lang.String label,
IContentViewerInput input,
java.lang.Object customValue)
public ICommand getAddAddConflictAcceptCommand(java.lang.String label,
IContentViewerInput input,
java.lang.Object mergedValue)
label - for the new ICommand.mergedValue - override value for the merge targetpublic org.eclipse.core.runtime.content.IContentType getContentType()