Eclipse Platform
2.1

org.eclipse.jface.text
Class ProjectionTextStore

java.lang.Object
  |
  +--org.eclipse.jface.text.ProjectionTextStore
All Implemented Interfaces:
ITextStore

public class ProjectionTextStore
extends Object
implements ITextStore

The text store of a ProjectionDocument. Implements the projection onto the master document.

This class is for internal use only.

Since:
2.1

Constructor Summary
ProjectionTextStore(ProjectionDocument projectionDocument)
          Creates a new projection text store for the given projection document.
 
Method Summary
 char get(int offset)
          Returns the character at the specified offset.
 String get(int offset, int length)
          Returns the text of the specified character range.
 int getLength()
          Returns number of characters stored in this text store.
 void replace(int offset, int length, String text)
          Replaces the specified character range with the given text.
 void set(String contents)
          Replace the content of the text store with the given text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectionTextStore

public ProjectionTextStore(ProjectionDocument projectionDocument)
Creates a new projection text store for the given projection document.
Parameters:
projectionDocument - the projection document
Method Detail

set

public void set(String contents)
Description copied from interface: ITextStore
Replace the content of the text store with the given text. Convenience method for replace(0, getLength(), text.
Specified by:
set in interface ITextStore
Following copied from interface: org.eclipse.jface.text.ITextStore
Parameters:
text - the new content of the text store

replace

public void replace(int offset,
                    int length,
                    String text)
Description copied from interface: ITextStore
Replaces the specified character range with the given text. replace(getLength(), 0, "some text") is a valid call and appends text to the end of the text store.
Specified by:
replace in interface ITextStore
Following copied from interface: org.eclipse.jface.text.ITextStore
Parameters:
offset - the offset of the range to be replaced
length - the number of characters to be replaced
text - the substitution text

getLength

public int getLength()
Description copied from interface: ITextStore
Returns number of characters stored in this text store.
Specified by:
getLength in interface ITextStore
Following copied from interface: org.eclipse.jface.text.ITextStore
Returns:
the number of characters stored in this text store

get

public String get(int offset,
                  int length)
Description copied from interface: ITextStore
Returns the text of the specified character range.
Specified by:
get in interface ITextStore
Following copied from interface: org.eclipse.jface.text.ITextStore
Parameters:
offset - the offset of the range
length - the length of the range
Returns:
the text of the range

get

public char get(int offset)
Description copied from interface: ITextStore
Returns the character at the specified offset.
Specified by:
get in interface ITextStore
Following copied from interface: org.eclipse.jface.text.ITextStore
Parameters:
offset - the offset in this text store
Returns:
the character at this offset

Eclipse Platform
2.1

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.