GapTextStore
performs better even for sequential rewrite scenariospublic class SequentialRewriteTextStore extends Object implements ITextStore
Constructor and Description |
---|
SequentialRewriteTextStore(ITextStore source)
Deprecated.
Creates a new sequential rewrite store for the given source store.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Deprecated.
Disposes this rewrite store.
|
char |
get(int offset)
Deprecated.
Returns the character at the specified offset.
|
String |
get(int offset,
int length)
Deprecated.
Returns the text of the specified character range.
|
int |
getLength()
Deprecated.
Returns number of characters stored in this text store.
|
ITextStore |
getSourceStore()
Deprecated.
Returns the source store of this rewrite store.
|
void |
replace(int offset,
int length,
String text)
Deprecated.
Replaces the specified character range with the given text.
|
void |
set(String text)
Deprecated.
Replace the content of the text store with the given text.
|
public SequentialRewriteTextStore(ITextStore source)
source
- the source text storepublic ITextStore getSourceStore()
public void replace(int offset, int length, String text)
ITextStore
replace(getLength(), 0, "some text")
is a valid
call and appends text to the end of the text store.replace
in interface ITextStore
offset
- the offset of the range to be replacedlength
- the number of characters to be replacedtext
- the substitution textpublic void set(String text)
ITextStore
replace(0, getLength(), text
.set
in interface ITextStore
text
- the new content of the text storepublic String get(int offset, int length)
ITextStore
get
in interface ITextStore
offset
- the offset of the rangelength
- the length of the rangepublic char get(int offset)
ITextStore
get
in interface ITextStore
offset
- the offset in this text storepublic int getLength()
ITextStore
getLength
in interface ITextStore
public void dispose()
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.