java - How to force TextMergeViewer to flush content even if content is unchanged? -


i implementing editor works on distant document. document first downloaded, copied in local cached file, displayed user edits , saves it. on 'save' action, document uploaded server. classic.

but sometimes, if distant document has been modified user during download/edit/upload cycle, conflict detected , compare editor presented user : local version displayed on left pane (and editable) , distant on right pane (and read-only). user "merge" operation manually (i don't consider automatic merge yet) , when save action launched, comparison result overwrites localy cached file afterwards uploaded onto server. still classic issue.

the problem is: if user wants discard distant modifications, , wants save document without modifying left pane, compare editor refuses flush content of pane in local file , can not detect user launched save action init upload operation. why compare editor refuses overwrite local version quite simple: since no modification has been made, considers there nothing flush.

i trying find way make believe has changed, seems textmergeviewer handles comparison not listening model change, , far code, don't know how reach (and seems not set left pane dirty anyway).


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -