Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.text
Interface ITextStore

All Known Implementing Classes:
CopyOnWriteTextStore, GapTextStore, SequentialRewriteTextStore

public interface ITextStore

Interface for storing and managing text.

Provides access to the stored text and allows to manipulate it.

Clients may implement this interface or use GapTextStore or CopyOnWriteTextStore.


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 text)
          Replace the content of the text store with the given text.
 

Method Detail

get

char get(int offset)
Returns the character at the specified offset.

Parameters:
offset - the offset in this text store
Returns:
the character at this offset

get


String get(int offset,
           int length)
Returns the text of the specified character range.

Parameters:
offset - the offset of the range
length - the length of the range
Returns:
the text of the range

getLength

int getLength()
Returns number of characters stored in this text store.

Returns:
the number of characters stored in this text store

replace

void replace(int offset,
             int length,
             
String text)
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.

Parameters:
offset - the offset of the range to be replaced
length - the number of characters to be replaced
text - the substitution text

set

void set(
String text)
Replace the content of the text store with the given text. Convenience method for replace(0, getLength(), text.

Parameters:
text - the new content of the text store

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire