Package org.eclipse.jdt.core
Interface IBuffer.ITextEditCapability
-
- Enclosing interface:
- IBuffer
public static interface IBuffer.ITextEditCapability
Implementors ofIBuffer
can additionally implementIBuffer.ITextEditCapability
. This adds the capability to apply text edits to the buffer and will be used byICompilationUnit.applyTextEdit(TextEdit, IProgressMonitor)
.This interface may be implemented by clients.
- Since:
- 3.4
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description UndoEdit
applyTextEdit(TextEdit edit, IProgressMonitor monitor)
Applies a text edit to this underlying buffer.
-
-
-
Method Detail
-
applyTextEdit
UndoEdit applyTextEdit(TextEdit edit, IProgressMonitor monitor) throws JavaModelException
Applies a text edit to this underlying buffer.- Parameters:
edit
- the edit to applymonitor
- the progress monitor to use ornull
if no progress should be reported- Returns:
- the undo edit
- Throws:
JavaModelException
- if this edit can not be applied to the buffer. Reasons include:- The provided edit can not be applied as there is a problem with the text edit locations (
IJavaModelStatusConstants.BAD_TEXT_EDIT_LOCATION
)}.
- The provided edit can not be applied as there is a problem with the text edit locations (
-
-