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()
IFileBufferOperationFileBufferOperationRunner while reporting
progress.getOperationName in interface IFileBufferOperationnullpublic void run(IFileBuffer fileBuffer, IProgressMonitor progressMonitor) throws CoreException, OperationCanceledException
IFileBufferOperationrun in interface IFileBufferOperationfileBuffer - the file bufferprogressMonitor - the progress monitorCoreException - in case the content manipulation failedOperationCanceledException - in case the monitor has been set to canceledGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.