public class BufferChange extends java.lang.Object implements IBufferChange
IBufferChange
.CREATE_UNDO, NONE, UPDATE_REGIONS
Constructor and Description |
---|
BufferChange(org.eclipse.text.edits.TextEdit edit)
Creates a new buffer change with the given text edit,
CREATE_UNDO|UPDATE_REGIONS style and
KEEP_SAVED_STATE save mode. |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(org.eclipse.text.edits.TextEdit edit)
Tells whether this change contains the given edit.
|
ISnapshot |
getBase()
Returns the snapshot on which this change's edit tree is based,
or
null if the snapshot is unknown. |
org.eclipse.text.edits.TextEdit |
getEdit()
Returns the edit tree associated with this change.
|
SaveMode |
getSaveMode()
Returns the save mode associated with this change.
|
int |
getStyle()
Returns the style flags associated with this change.
|
void |
setBase(ISnapshot base)
Sets the snapshot on which this change is based.
|
void |
setSaveMode(SaveMode saveMode)
Sets the save mode of this change.
|
void |
setStyle(int style)
Sets the style flags for this change.
|
public BufferChange(org.eclipse.text.edits.TextEdit edit)
CREATE_UNDO|UPDATE_REGIONS
style and
KEEP_SAVED_STATE
save mode.edit
- a text edit (not null
)public void setBase(ISnapshot base)
base
- the snapshot on which the change is based,
or null
if unknownpublic void setStyle(int style)
IBufferChange.NONE
or any combination of IBufferChange.CREATE_UNDO
and IBufferChange.UPDATE_REGIONS
.style
- style flagspublic void setSaveMode(SaveMode saveMode)
saveMode
- a save modepublic org.eclipse.text.edits.TextEdit getEdit()
IBufferChange
getEdit
in interface IBufferChange
null
)public boolean contains(org.eclipse.text.edits.TextEdit edit)
IBufferChange
contains
in interface IBufferChange
edit
- a text edittrue
if the change contains the given edit,
and false
otherwisepublic ISnapshot getBase()
IBufferChange
null
if the snapshot is unknown.getBase
in interface IBufferChange
null
if unknownpublic int getStyle()
IBufferChange
IBufferChange.NONE
or any combination of IBufferChange.CREATE_UNDO
and
IBufferChange.UPDATE_REGIONS
flags.getStyle
in interface IBufferChange
public SaveMode getSaveMode()
IBufferChange
getSaveMode
in interface IBufferChange
Copyright (c) 2014, 2020 1C-Soft LLC and others. Made available under the Eclipse Public License 2.0