Class RemoveTrailingWhitespaceOperation
java.lang.Object
org.eclipse.core.filebuffers.manipulation.TextFileBufferOperation
org.eclipse.core.filebuffers.manipulation.RemoveTrailingWhitespaceOperation
- All Implemented Interfaces:
IFileBufferOperation
A text file buffer operation that removes all trailing whitespace.
- Since:
- 3.1
-
Constructor Summary
ConstructorDescriptionCreates a remove trailing whitespace operation. -
Method Summary
Modifier and TypeMethodDescriptionprotected MultiTextEditWithProgress
computeTextEdit
(ITextFileBuffer fileBuffer, IProgressMonitor progressMonitor) Computes and returns a text edit.protected DocumentRewriteSessionType
Returns the rewrite session type that corresponds to the text edit sequence.Methods inherited from class org.eclipse.core.filebuffers.manipulation.TextFileBufferOperation
getOperationName, run
-
Constructor Details
-
RemoveTrailingWhitespaceOperation
public RemoveTrailingWhitespaceOperation()Creates a remove trailing whitespace operation.
-
-
Method Details
-
computeTextEdit
protected MultiTextEditWithProgress computeTextEdit(ITextFileBuffer fileBuffer, IProgressMonitor progressMonitor) throws CoreException Description copied from class:TextFileBufferOperation
Computes and returns a text edit. Subclasses have to provide that method.- Specified by:
computeTextEdit
in classTextFileBufferOperation
- Parameters:
fileBuffer
- the text file buffer to manipulateprogressMonitor
- the progress monitor- Returns:
- the text edits describing the content manipulation
- Throws:
CoreException
- in case the computation failed
-
getDocumentRewriteSessionType
Description copied from class:TextFileBufferOperation
Returns the rewrite session type that corresponds to the text edit sequence.- Specified by:
getDocumentRewriteSessionType
in classTextFileBufferOperation
- Returns:
- the rewrite session type
-