public interface ICompareMergeController
extends org.eclipse.compare.IPropertyChangeNotifier
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener listener)
Adds a listener for property changes to this notifier.
|
boolean |
canAutoAdvance()
Determines if the Auto-Advance action can be enabled.
|
boolean |
canSaveMergedContributor()
Checks if it is possible to save the merged result to the default
location
|
boolean |
canSaveMergedContributorAs(ContributorType contributor)
Checks if it is possible to save the merged result on top of Left ot
Right contributors
|
void |
close()
Called when the parent Merge Viewer is disposed.
|
void |
closeCompareMergeSession()
Close C/M session, if any.
|
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. |
ActionManager |
getActionManager()
Returns the action manager for this session
|
ICommand |
getChangeChangeConflictAcceptCommand(java.lang.String label,
IContentViewerInput input,
java.lang.Object customValue)
Returns the command for resolve the conflict with given custom value.
|
com.ibm.xtools.comparemerge.ui.internal.tasks.ICMTaskFactory |
getCMTaskFactory()
Returns factory for managing operations related to Compare/Merge tasks.
|
IContentViewerInput |
getContentViewerInput()
Returns the current diff/conflict input
|
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.
|
AbstractMergeManager |
getMergeManager()
Returns the merge manager for the compare merge session
|
AbstractMergeViewer |
getMergeViewer()
Retrieves reference to the parent Merge Viewer
|
INavigationProvider |
getNavigationProvider()
Returns the navigation provider for diff/conflict navigation
|
java.lang.Object |
getProperty(java.lang.String key)
Returns the property with the given name, or
null if no
such property exists. |
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
conflciting Difference from a specified Contributor
|
org.eclipse.jface.viewers.ISelectionProvider |
getSelectionProvider()
Returns the selection provider for diff/conflict
|
MergeSessionInfo |
getSessionInfo()
Returns the information about current Compare/Merge session, such as the
Ancestor, Left, Right, Merged descriptors, CompareConfiguration, other
flags.
|
boolean |
isAutoAdvance()
Determines whether the structure pane's selection must auto advance to
the next unresolved Conflict/Diff once the previos one was resolved.
|
boolean |
isCompareMergeSessionOpen()
Determines if the C/M session was open and it is in good "healthy" state
(not faile because of incorrect data in the input etc).
|
boolean |
isContributorVisible(ContributorType type)
Returns whether the specified contributor should be shown.
|
boolean |
isDirty()
Checks is the model was modified since the beginning or the last save
operation
|
boolean |
isMergeCompleted()
Returns whether all conflicts have been resolved.
|
boolean |
isMergeMode()
Returns whether the session is a merge session or not.
|
boolean |
isThreeWayMode()
Returns whether the session is a three way comparison or not.
|
void |
openCompareMergeSession(org.eclipse.compare.structuremergeviewer.ICompareInput input)
Starts a new C/M session.
|
void |
removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener listener)
Removes the given content change listener from this notifier.
|
void |
resumeUpdates()
Resumes updates for the panes.
|
void |
revertMergeSession()
Will revert an existing Merge session.
|
void |
saveDeltas()
Saves the deltas to a file selected by dialog
|
void |
saveMergedContributor()
Saves the modified contents of the Merged contributor
|
void |
saveMergedContributorAs(ContributorType contributor)
Will save the merged result on top of Left ot Right contributors
|
void |
saveMergedContributorCopy()
Saves the modified contents of the Merged contributor to a file selected
by dialog
|
void |
setAutoAdvance(boolean advance)
Sets whether the structure pane's selection must auto advance to the next
unresolved Conflict/Diff once the previous one was resolved.
|
void |
setProperty(java.lang.String key,
java.lang.Object newValue)
Sets the property with the given name.
|
void |
suspendUpdates()
Suspends updates for the panes to avoid frequent refreshes while merging
data.
|
boolean |
wasSaved() |
void close()
void openCompareMergeSession(org.eclipse.compare.structuremergeviewer.ICompareInput input) throws java.lang.Exception
input
- the new compare input for new sessionjava.lang.Exception
void closeCompareMergeSession()
boolean isCompareMergeSessionOpen()
void revertMergeSession() throws java.lang.Exception
java.lang.Exception
AbstractMergeViewer getMergeViewer()
INavigationProvider getNavigationProvider()
null
if noneorg.eclipse.jface.viewers.ISelectionProvider getSelectionProvider()
null
if noneAbstractMergeManager getMergeManager()
null
if noneActionManager getActionManager()
null
if noneIContentViewerInput getContentViewerInput()
null
if noneMergeSessionInfo getSessionInfo()
boolean isMergeCompleted()
true
if all conflicts are resolvedboolean canSaveMergedContributor()
void saveMergedContributor() throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
- in case of the file I/O errorvoid saveMergedContributorCopy() throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
- in case of the file I/O errorvoid saveMergedContributorAs(ContributorType contributor) throws org.eclipse.core.runtime.CoreException
contributor
- to save on top oforg.eclipse.core.runtime.CoreException
- in case of errorboolean canSaveMergedContributorAs(ContributorType contributor)
contributor
- to checkvoid saveDeltas()
boolean isMergeMode()
boolean isThreeWayMode()
boolean isDirty()
boolean isAutoAdvance()
boolean canAutoAdvance()
void setAutoAdvance(boolean advance)
advance
- to specify whether the structure pane's selection must auto
advance to the next unresolved Conflict/Diff once the previos
one was resolved. Normally is set by the AutoAdvanceAction.boolean isContributorVisible(ContributorType type)
type
- the contributor type (for e.g.
ContributorType.ANCESTOR
)true
if the specified contributor should be shown,
false otherwiseICommand 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 noneICommand 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 noneICommand getAcceptAllNonconflictingCommand(java.lang.String label)
null
if noneICommand 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 noneICommand getRejectAllCommand(java.lang.String label, ContributorType contributor)
label
- for the new ICommand.contributor
- to reject all Differences fromnull
if noneICommand 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 noneICommand getResolveAllCommand(java.lang.String label, ContributorType contributor)
label
- for the new ICommand.contributor
- to resolve all Conflicts withnull
if noneICommand 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 noneICommand getIgnoreAllCommand(java.lang.String label)
label
- for the new ICommand.null
if nonevoid addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener listener)
addPropertyChangeListener
in interface org.eclipse.compare.IPropertyChangeNotifier
void removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener listener)
removePropertyChangeListener
in interface org.eclipse.compare.IPropertyChangeNotifier
void setProperty(java.lang.String key, java.lang.Object newValue)
PropertyChangeEvent
is sent to registered listeners.key
- the name of the property to setnewValue
- the new value of the propertyjava.lang.Object getProperty(java.lang.String key)
null
if no
such property exists.key
- the name of the property to retrievenull
if not
foundvoid suspendUpdates()
void resumeUpdates()
boolean wasSaved()
ICommand getProxyCommand(java.lang.String label, java.util.Collection emfCommands)
label
- the label for the proxy commandemfCommands
- the collection of EMF commandsICommand getChangeChangeConflictAcceptCommand(java.lang.String label, IContentViewerInput input, java.lang.Object customValue)
label
- for the new ICommand.customValue
- overide value for the merge targetcom.ibm.xtools.comparemerge.ui.internal.tasks.ICMTaskFactory getCMTaskFactory()
ICMTaskFactory