public abstract class TextFileBufferOperation extends Object implements IFileBufferOperation
computeTextEdits
method in
order to provide a sequence of TextEdit
objects.Modifier | Constructor and Description |
---|---|
protected |
TextFileBufferOperation(String operationName)
Creates a new operation with the given name.
|
Modifier and Type | Method and Description |
---|---|
protected abstract MultiTextEditWithProgress |
computeTextEdit(ITextFileBuffer textFileBuffer,
IProgressMonitor progressMonitor)
Computes and returns a text edit.
|
protected abstract DocumentRewriteSessionType |
getDocumentRewriteSessionType()
Returns the rewrite session type that corresponds to the text edit sequence.
|
String |
getOperationName()
Returns the name of this file buffer operation.
|
void |
run(IFileBuffer fileBuffer,
IProgressMonitor progressMonitor)
Runs this operation, that is manipulates the content of the given file
buffer.
|
protected TextFileBufferOperation(String operationName)
operationName
- the name of the operationprotected abstract MultiTextEditWithProgress computeTextEdit(ITextFileBuffer textFileBuffer, IProgressMonitor progressMonitor) throws CoreException, OperationCanceledException
textFileBuffer
- the text file buffer to manipulateprogressMonitor
- the progress monitorCoreException
- in case the computation failedOperationCanceledException
- in case the progress monitor has been set to canceledprotected abstract DocumentRewriteSessionType getDocumentRewriteSessionType()
public String getOperationName()
IFileBufferOperation
FileBufferOperationRunner
while reporting
progress.getOperationName
in interface IFileBufferOperation
null
public void run(IFileBuffer fileBuffer, IProgressMonitor progressMonitor) throws CoreException, OperationCanceledException
IFileBufferOperation
run
in interface IFileBufferOperation
fileBuffer
- the file bufferprogressMonitor
- the progress monitorCoreException
- in case the content manipulation failedOperationCanceledException
- in case the monitor has been set to canceled
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.