Interface IModelUpdateStrategy
-
- All Known Implementing Classes:
SingleValuedAttributeModelUpdateStrategy
public interface IModelUpdateStrategyA strategy for updating the model with changes made from within a content merge viewer.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanUpdate(Diff diff, IMergeViewer.MergeViewerSide side)Specifies whether the value in the model can to be updated on the givenside.CommandgetModelUpdateCommand(Diff diff, Object newValue, IMergeViewer.MergeViewerSide side)Returns a command for updating the underlying model with the givennewValueon the givenside.
-
-
-
Method Detail
-
canUpdate
boolean canUpdate(Diff diff, IMergeViewer.MergeViewerSide side)
Specifies whether the value in the model can to be updated on the givenside.- Parameters:
diff- The diff acting as context of the potential model update.side- The side to check.- Returns:
trueif the value can be updated,falseotherwise.
-
getModelUpdateCommand
Command getModelUpdateCommand(Diff diff, Object newValue, IMergeViewer.MergeViewerSide side)
Returns a command for updating the underlying model with the givennewValueon the givenside.- Parameters:
diff- The diff acting as context of the model update.newValue- The new value to be set.side- The side on which the update is to be performed.- Returns:
- A command to perform the model update.
-
-