User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

wrap_multiple_changes_into_one_compound_change [2015/06/11 18:50] (current)
mihael created
Line 1: Line 1:
 +====== Wrap Multiple Document Changes into one Compound Change =====
 +If multiple changes on a document of a TextViewer or SourceViewer should be undo/​redo-able with a single action then it must be wrapped into a compound change.
 +<sxh java>
 +IRewriteTarget target= viewer.getRewriteTarget();​
 +try {
 +    ...
 +    doTheChanges();​
 +    ...
 +} finally {
 +    target.endCompoundChange();​
 +{{tag>​java jface}}
wrap_multiple_changes_into_one_compound_change.txt ยท Last modified: 2015/06/11 18:50 by mihael