org.eclipse.xtext.ui.editor.reconciler
Class ReplaceRegion

java.lang.Object
  extended by org.eclipse.xtext.ui.editor.reconciler.ReplaceRegion
All Implemented Interfaces:
org.eclipse.jface.text.IRegion, org.eclipse.jface.text.ITypedRegion

public class ReplaceRegion
extends java.lang.Object
implements org.eclipse.jface.text.ITypedRegion

Author:
Jan Köhnlein - Initial contribution and API

Field Summary
static java.lang.String REPLACE
           
 
Constructor Summary
ReplaceRegion(int offset, int originalLength, java.lang.String text)
           
 
Method Summary
 int getLength()
          Returns the length of the region.
 int getOffset()
          Returns the offset of the region.
 java.lang.String getText()
           
 java.lang.String getType()
          Returns the content type of the region.
 void mergeWith(ReplaceRegion next, java.lang.Object textAfterNextChange)
           
protected  int toOriginalIndex(int indexAfterReplace)
           
protected  int toReplacedIndex(int originalIndex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REPLACE

public static final java.lang.String REPLACE
See Also:
Constant Field Values
Constructor Detail

ReplaceRegion

public ReplaceRegion(int offset,
                     int originalLength,
                     java.lang.String text)
Parameters:
offset -
originalLength -
type -
text -
Method Detail

getType

public java.lang.String getType()
Description copied from interface: org.eclipse.jface.text.ITypedRegion
Returns the content type of the region.

Specified by:
getType in interface org.eclipse.jface.text.ITypedRegion
Returns:
the content type of the region

mergeWith

public void mergeWith(ReplaceRegion next,
                      java.lang.Object textAfterNextChange)

toOriginalIndex

protected int toOriginalIndex(int indexAfterReplace)

toReplacedIndex

protected int toReplacedIndex(int originalIndex)

getOffset

public int getOffset()
Description copied from interface: org.eclipse.jface.text.IRegion
Returns the offset of the region.

Specified by:
getOffset in interface org.eclipse.jface.text.IRegion
Returns:
the offset of the region

getText

public java.lang.String getText()

getLength

public int getLength()
Description copied from interface: org.eclipse.jface.text.IRegion
Returns the length of the region.

Specified by:
getLength in interface org.eclipse.jface.text.IRegion
Returns:
the length of the region