Eclipse Platform
Release 3.1

org.eclipse.core.filebuffers.manipulation
Interface IFileBufferOperation

All Known Implementing Classes:
TextFileBufferOperation

public interface IFileBufferOperation

A file buffer operation performs changes of the contents of a file buffer.

File buffer operations are executed by a FileBufferOperationRunner. 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

Method Summary
 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

public 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

public 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

Eclipse Platform
Release 3.1

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.