|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.cdt.internal.core.PositionTracker
public class PositionTracker
Tracks changes made to a text buffer, to afterwards recalculate positions.
Constructor Summary | |
---|---|
PositionTracker()
|
Method Summary | |
---|---|
org.eclipse.jface.text.IRegion |
actualToHistoric(org.eclipse.jface.text.IRegion actualPosition)
Converts an actual character range to the range where the underlying text was originally found. |
void |
clear()
Resets the tracker to a state reflecting no changes. |
int |
currentOffset(int historicOffset)
Calculates the position in the modified text. |
void |
delete(int offset,
int count)
Notifies the tracker of the removal of characters. |
int |
depth()
For the purpose of testing. |
int |
getMemorySize()
|
long |
getRetiredTimeStamp()
|
long |
getTimeStamp()
|
int |
historicOffset(int currentOffset)
Calculates the position in the original unmodified text. |
org.eclipse.jface.text.IRegion |
historicToActual(org.eclipse.jface.text.IRegion historicPosition)
Converts a historic character range to the range where the underlying text currently can be found. |
void |
insert(int offset,
int count)
Notifies the tracker of the insertion of characters. |
boolean |
isModified()
|
void |
print(java.io.PrintStream out)
For the purpose of testing. |
void |
retire(PositionTracker inFavourOf)
Makes this tracker final. |
void |
setTimeStamp(long timeStamp)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PositionTracker()
Method Detail |
---|
public void clear()
public void insert(int offset, int count)
offset
- offset of the character in front of which insertion occurs.count
- amount of characters inserted.public void delete(int offset, int count)
offset
- offset of the first character deleted.count
- amount of characters deleted.public int historicOffset(int currentOffset)
currentOffset
- position in the modified text.
public int currentOffset(int historicOffset)
historicOffset
- position in the unmodified text.
public void retire(PositionTracker inFavourOf)
inFavourOf
- tracker that tracks changes from now on.public void print(java.io.PrintStream out)
public int depth()
public boolean isModified()
public long getTimeStamp()
public void setTimeStamp(long timeStamp)
public long getRetiredTimeStamp()
public int getMemorySize()
public org.eclipse.jface.text.IRegion actualToHistoric(org.eclipse.jface.text.IRegion actualPosition)
IPositionConverter
actualToHistoric
in interface IPositionConverter
actualPosition
- a range as found in the current text buffer for the file.
public org.eclipse.jface.text.IRegion historicToActual(org.eclipse.jface.text.IRegion historicPosition)
IPositionConverter
historicToActual
in interface IPositionConverter
historicPosition
- a range as found in the version of the file for which
the converter was obtained.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |