Interface IXtextFile.IModifyingUnitOfWork<T>
-
- All Superinterfaces:
org.eclipse.xtext.util.concurrent.IUnitOfWork<T,org.eclipse.xtext.resource.XtextResource>
- All Known Implementing Classes:
IXtextFile.ModifyingUnitOfWork
,IXtextFile.ModifyingUnitOfWorkWithDelegate
- Enclosing interface:
- IXtextFile
public static interface IXtextFile.IModifyingUnitOfWork<T> extends org.eclipse.xtext.util.concurrent.IUnitOfWork<T,org.eclipse.xtext.resource.XtextResource>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.xtext.util.concurrent.IUnitOfWork
org.eclipse.xtext.util.concurrent.IUnitOfWork.Void<T extends Object>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
acceptUndoChange(org.eclipse.handly.buffer.IBufferChange undoChange)
Notification of an undo change.org.eclipse.handly.buffer.IBufferChange
newBufferChange(org.eclipse.text.edits.TextEdit edit, org.eclipse.handly.snapshot.ISnapshot base)
Returns a new buffer change according to the given specifications.boolean
shouldRetry()
Returns whether the transaction should be retried if it has failed due to a stale snapshot.
-
-
-
Method Detail
-
newBufferChange
org.eclipse.handly.buffer.IBufferChange newBufferChange(org.eclipse.text.edits.TextEdit edit, org.eclipse.handly.snapshot.ISnapshot base)
Returns a new buffer change according to the given specifications.- Parameters:
edit
- the text edit (notnull
)base
- the snapshot on which the change is based (notnull
)- Returns:
- the created buffer change (never
null
)
-
acceptUndoChange
void acceptUndoChange(org.eclipse.handly.buffer.IBufferChange undoChange)
Notification of an undo change.- Parameters:
undoChange
- the undo change, ornull
if the change created by this unit of work was not undoable
-
shouldRetry
boolean shouldRetry()
Returns whether the transaction should be retried if it has failed due to a stale snapshot. Note that iftrue
is always returned, it may lead to an infinite loop.- Returns:
true
if the transaction should be retried,false
otherwise
-
-