Differences
This shows you the differences between two versions of the page.
wrap_multiple_changes_into_one_compound_change [2015/06/11 20:50] |
wrap_multiple_changes_into_one_compound_change [2021/04/05 11:23] (current) |
||
---|---|---|---|
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/ | ||
+ | <sxh java> | ||
+ | IRewriteTarget target= viewer.getRewriteTarget(); | ||
+ | target.beginCompoundChange(); | ||
+ | try { | ||
+ | ... | ||
+ | doTheChanges(); | ||
+ | ... | ||
+ | } finally { | ||
+ | target.endCompoundChange(); | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | {{tag> |