|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.text.DefaultPositionUpdater
Default implementation of IPositionUpdater
.
A default position updater must be configured with the position category whose positions it will update. Other position categories are not affected by this updater.
This implementation follows the following specification:
Field Summary | |
---|---|
protected IDocument |
fDocument
Catches the document |
protected int |
fLength
Caches the length of the replaced text |
protected int |
fOffset
Caches the offset of the replaced text |
protected Position |
fOriginalPosition
Remembers the original state of the investigated position |
protected Position |
fPosition
Caches the currently investigated position |
protected int |
fReplaceLength
Caches the length of the newly inserted text |
Constructor Summary | |
---|---|
DefaultPositionUpdater(String category)
Creates a new default position updater for the given category. |
Method Summary | |
---|---|
protected void |
adaptToInsert()
Adapts the currently investigated position to an insertion. |
protected void |
adaptToRemove()
Adapts the currently investigated position to a deletion. |
protected void |
adaptToReplace()
Adapts the currently investigated position to the replace operation. |
protected String |
getCategory()
Returns the category this updater is responsible for. |
protected boolean |
isAffectingReplace()
Returns whether the current event describes a well formed replace by which the current position is directly affected. |
protected boolean |
notDeleted()
Determines whether the currently investigated position has been deleted by the replace operation specified in the current event. |
void |
update(DocumentEvent event)
Adapts positions to the change specified by the document event. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Position fPosition
protected Position fOriginalPosition
protected int fOffset
protected int fLength
protected int fReplaceLength
protected IDocument fDocument
Constructor Detail |
public DefaultPositionUpdater(String category)
category
- the category the updater is responsible forMethod Detail |
protected String getCategory()
protected boolean isAffectingReplace()
true
the current position is directly affectedprotected void adaptToInsert()
protected void adaptToRemove()
protected void adaptToReplace()
protected boolean notDeleted()
true
if position has been deletedpublic void update(DocumentEvent event)
IPositionUpdater
update
in interface IPositionUpdater
event
- the document event describing the document change
|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.