|
Eclipse Platform Pre-release 3.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.jface.text.DocumentCommand
Represents a text modification as a document replace command. The text modification is given
as a VerifyEvent and translated into a document replace command relative
to a given offset. A document command can also be used to initialize a given VerifyEvent.
A document command can also represent a list of related changes.
| Field Summary | |
int |
caretOffset
The caret offset with respect to the document before the document command is executed. |
boolean |
doit
Must the command be updated |
int |
length
The length of the command |
int |
offset
The offset of the command. |
IDocumentListener |
owner
The owner of the document command which will not be notified. |
boolean |
shiftsCaret
Indicates whether the caret should be shifted by this command. |
String |
text
The text to be inserted |
| Constructor Summary | |
protected |
DocumentCommand()
Creates a new document command. |
| Method Summary | |
void |
addCommand(int offset,
int length,
String text,
boolean shiftsCaret,
IDocumentListener owner)
Adds an additional replace command. |
void |
addCommand(int offset,
int length,
String text,
IDocumentListener owner)
Adds an additional replace command. |
int |
getCommandCount()
Returns the number of commands including the original document command. |
Iterator |
getCommandIterator()
Returns an iterator over the commands in ascending position order. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public boolean doit
public int offset
public int length
public String text
public IDocumentListener owner
public int caretOffset
public boolean shiftsCaret
| Constructor Detail |
protected DocumentCommand()
| Method Detail |
public void addCommand(int offset,
int length,
String text,
boolean shiftsCaret,
IDocumentListener owner)
throws BadLocationException
null, it will not
get document change notifications for the particular command.
offset - the offset of the region to replacelength - the length of the region to replacetext - the text to replace with, may be nullshiftsCaret - true if the command shifts the caretowner - the command owner, may be null
BadLocationException - if the added command intersects with an existing one
public void addCommand(int offset,
int length,
String text,
IDocumentListener owner)
throws BadLocationException
null, it will not
get document change notifications for the particular command.
offset - the offset of the region to replacelength - the length of the region to replacetext - the text to replace with, may be nullowner - the command owner, may be null
BadLocationException - if the added command intersects with an existing onepublic Iterator getCommandIterator()
public int getCommandCount()
|
Eclipse Platform Pre-release 3.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||