|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jface.text.Position org.electrocodeogram.cpc.core.api.provider.track.CPCPosition
public class CPCPosition
Represents the position of an IClone
object during modifications of an IDocument
.
Keeps reference to the corresponding IClone
object.
NOTE: updating a CPCPosition
does not directly affect the corresponding IClone
instance.
Modifications may be cached and written back to the clone objects at a later point in time.
NOTE: CPCPosition
s are not encapsulated behind a separate interface for performance reasons.
The IPositionUpdateStrategyProvider
may directly access and modify field values to improve performance.
IPositionUpdateStrategyProvider
Field Summary | |
---|---|
IClone |
clone
|
java.lang.String |
content
|
boolean |
contentModified
|
java.util.List<CPCDocumentEvent> |
contentModifyingDocumentEvents
|
static java.lang.String |
CPC_POSITION_CATEGORY
The unique position category name for all CPCPosition entries. |
Fields inherited from class org.eclipse.jface.text.Position |
---|
isDeleted, length, offset |
Constructor Summary | |
---|---|
CPCPosition(IClone clone)
Creates a new CPCPosition with the position of the given clone object. |
Method Summary | |
---|---|
void |
addContentModifyingDocumentEvent(CPCDocumentEvent cpcEvent)
Adds the given CPCDocumentEvent to this CPCPosition . |
IClone |
getClone()
Retrieves the clone corresponding to this position. |
java.lang.String |
getContent()
Retrieves the current content of the corresponding clone entry. |
java.util.List<CPCDocumentEvent> |
getContentModifyingDocumentEvents()
Retrieves a list of events which affected this position. |
int |
getEndOffset()
Retrieves the end offset of this position. |
boolean |
isContentModified()
Checks whether the clone content of this position was modified. |
void |
setContent(java.lang.String content)
Sets current content of the corresponding clone entry. |
void |
setContentModified(boolean contentModified)
Specifies whether the clone content of this position was modified. |
java.lang.String |
toString()
|
Methods inherited from class org.eclipse.jface.text.Position |
---|
delete, equals, getLength, getOffset, hashCode, includes, isDeleted, overlapsWith, setLength, setOffset, undelete |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CPC_POSITION_CATEGORY
public IClone clone
getClone()
public java.lang.String content
getContent()
public boolean contentModified
isContentModified()
public java.util.List<CPCDocumentEvent> contentModifyingDocumentEvents
getContentModifyingDocumentEvents()
Constructor Detail |
---|
public CPCPosition(IClone clone)
CPCPosition
with the position of the given clone object.
clone
- the clone object which this position should represent, never null.Method Detail |
---|
public IClone getClone()
public boolean isContentModified()
public void setContentModified(boolean contentModified)
isContentModified()
public java.lang.String getContent()
public void setContent(java.lang.String content)
getContent()
public java.util.List<CPCDocumentEvent> getContentModifyingDocumentEvents()
public void addContentModifyingDocumentEvent(CPCDocumentEvent cpcEvent)
CPCDocumentEvent
to this CPCPosition
.
cpcEvent
- the CPCDocumentEvent
to add, never null.public int getEndOffset()
Position.getOffset()
+ Position.getLength()
- 1public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |