|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.electrocodeogram.cpc.core.api.provider.track.CPCDocumentEvent
public class CPCDocumentEvent
A CPCDocumentEvent
is similar to a DocumentEvent
. However, it describes only
those parts of a DocumentEvent
which were located inside the corresponding clone.
I.e. depending on the IPositionUpdateStrategyProvider
, a modification which only partly
overlaps with a clone might not become part of the clone. The corresponding CPCDocumentEvent
would therefore differ from the DocumentEvent
. It would only specify the removal of
characters from the clone, not the addition of new content (which didn't become part of the clone).
It is the responsibility of the IPositionUpdateStrategyProvider
to create CPCDocumentEvent
s
which match its internal position updating strategies.
IPositionUpdateStrategyProvider
Field Summary | |
---|---|
int |
fLength
|
int |
fOffset
|
java.lang.String |
fText
|
Constructor Summary | |
---|---|
CPCDocumentEvent(int offset,
int length,
java.lang.String text)
Creates a new CPCDocumentEvent . |
Method Summary | |
---|---|
int |
getLength()
Retrieves the number of removed characters which were part of the clone. |
int |
getOffset()
Retrieves the relative position to beginning of clone. |
java.lang.String |
getText()
Retrieves the newly inserted text which became part of the clone. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int fOffset
getOffset()
public int fLength
getLength()
public java.lang.String fText
getText()
Constructor Detail |
---|
public CPCDocumentEvent(int offset, int length, java.lang.String text)
CPCDocumentEvent
.
offset
- relative position to beginning of clone, always >= 0.length
- number of removed characters which were part of the clone, always >= 0.text
- newly inserted text which became part of the clone, may be NULL.Method Detail |
---|
public int getOffset()
public int getLength()
public java.lang.String getText()
public 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 |