Eclipse Platform
Release 3.1

org.eclipse.core.filebuffers.manipulation
Class ConvertLineDelimitersOperation

java.lang.Object
  extended byorg.eclipse.core.filebuffers.manipulation.TextFileBufferOperation
      extended byorg.eclipse.core.filebuffers.manipulation.ConvertLineDelimitersOperation
All Implemented Interfaces:
IFileBufferOperation

public class ConvertLineDelimitersOperation
extends TextFileBufferOperation

A text file buffer operation that changes the line delimiters to a specified line delimiter.

Since:
3.1

Constructor Summary
ConvertLineDelimitersOperation(String lineDelimiter)
          Creates a new line delimiter conversion operation for the given target delimiter.
 
Method Summary
protected  MultiTextEditWithProgress computeTextEdit(ITextFileBuffer fileBuffer, IProgressMonitor progressMonitor)
          Computes and returns a text edit.
protected  DocumentRewriteSessionType getDocumentRewriteSessionType()
          Returns the rewrite session type that corresponds to the text edit sequence.
 
Methods inherited from class org.eclipse.core.filebuffers.manipulation.TextFileBufferOperation
getOperationName, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConvertLineDelimitersOperation

public ConvertLineDelimitersOperation(String lineDelimiter)
Creates a new line delimiter conversion operation for the given target delimiter.

Parameters:
lineDelimiter - the target line delimiter
Method Detail

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 class TextFileBufferOperation
Parameters:
fileBuffer - the text file buffer to manipulate
progressMonitor - the progress monitor
Returns:
the text edits describing the content manipulation
Throws:
CoreException - in case the computation failed

getDocumentRewriteSessionType

protected DocumentRewriteSessionType getDocumentRewriteSessionType()
Description copied from class: TextFileBufferOperation
Returns the rewrite session type that corresponds to the text edit sequence.

Specified by:
getDocumentRewriteSessionType in class TextFileBufferOperation
Returns:
the rewrite session type

Eclipse Platform
Release 3.1

Guidelines for using Eclipse APIs.

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