org.eclipse.core.filebuffers.manipulation
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
a
GenericFileBufferOperationRunner
.
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 of IFileBufferOperation
is
constrained to buffer content manipulation.
-
Since:
- 3.1
-
See Also:
-
FileBufferOperationRunner
getOperationName
String getOperationName()
- Returns the name of this file buffer operation. The operation name is
used by the
FileBufferOperationRunner
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 buffer -
monitor
- the progress monitor
-
Throws:
-
CoreException
- in case the content manipulation failed
-
OperationCanceledException
- in case the monitor has been set to canceled
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.