|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.filebuffers.manipulation.TextFileBufferOperation
Abstraction for a file buffer operation that works on text file buffers.
Subclasses have to override the computeTextEdits
method in
order to provide a sequence of TextEdit
objects.
Constructor Summary | |
---|---|
protected |
TextFileBufferOperation(String operationName)
Creates a new operation with the given name. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected TextFileBufferOperation(String operationName)
operationName
- the name of the operationMethod Detail |
protected abstract MultiTextEditWithProgress computeTextEdit(ITextFileBuffer textFileBuffer, IProgressMonitor progressMonitor) throws CoreException, OperationCanceledException
textFileBuffer
- the text file buffer to manipulateprogressMonitor
- the progress monitor
CoreException
- in case the computation failed
OperationCanceledException
- 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 monitor
OperationCanceledException
- in case the monitor has been set to canceled
CoreException
- in case the content manipulation failed
|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.