Class ConvertLineDelimitersOperation
java.lang.Object
org.eclipse.core.filebuffers.manipulation.TextFileBufferOperation
org.eclipse.core.filebuffers.manipulation.ConvertLineDelimitersOperation
- All Implemented Interfaces:
IFileBufferOperation
A text file buffer operation that changes the line delimiters to a specified line delimiter.
- Since:
- 3.1
-
Constructor Summary
ConstructorsConstructorDescriptionConvertLineDelimitersOperation(String lineDelimiter) Creates a new line delimiter conversion operation for the given target delimiter. -
Method Summary
Modifier and TypeMethodDescriptionprotected MultiTextEditWithProgresscomputeTextEdit(ITextFileBuffer fileBuffer, IProgressMonitor progressMonitor) Computes and returns a text edit.protected DocumentRewriteSessionTypeReturns 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
-
ConvertLineDelimitersOperation
Creates a new line delimiter conversion operation for the given target delimiter.- Parameters:
lineDelimiter- the target line delimiter
-
-
Method Details
-
computeTextEdit
protected MultiTextEditWithProgress computeTextEdit(ITextFileBuffer fileBuffer, IProgressMonitor progressMonitor) throws CoreException Description copied from class:TextFileBufferOperationComputes and returns a text edit. Subclasses have to provide that method.- Specified by:
computeTextEditin 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:TextFileBufferOperationReturns the rewrite session type that corresponds to the text edit sequence.- Specified by:
getDocumentRewriteSessionTypein classTextFileBufferOperation- Returns:
- the rewrite session type
-