Interface IFileBufferOperation
-
- All Known Implementing Classes:
ConvertLineDelimitersOperation
,RemoveTrailingWhitespaceOperation
,TextFileBufferOperation
public interface IFileBufferOperation
A file buffer operation performs changes of the contents of a file buffer.File buffer operations can be executed by a
FileBufferOperationRunner
or aGenericFileBufferOperationRunner
. The operation runner takes care of all aspects that are common to file buffer manipulation such as creating file buffers, state validation, committing file buffers, etc. Thus, the purpose ofIFileBufferOperation
is constrained to buffer content manipulation.- Since:
- 3.1
- See Also:
FileBufferOperationRunner
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getOperationName()
Returns the name of this file buffer operation.void
run(IFileBuffer fileBuffer, IProgressMonitor monitor)
Runs this operation, that is manipulates the content of the given file buffer.
-
-
-
Method Detail
-
getOperationName
String getOperationName()
Returns the name of this file buffer operation. The operation name is used by theFileBufferOperationRunner
while reporting progress.- Returns:
- the operation name or
null
-
run
void run(IFileBuffer fileBuffer, IProgressMonitor monitor) throws CoreException, OperationCanceledException
Runs this operation, that is manipulates the content of the given file buffer.- Parameters:
fileBuffer
- the file buffermonitor
- the progress monitor- Throws:
CoreException
- in case the content manipulation failedOperationCanceledException
- in case the monitor has been set to canceled
-
-