|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The interface BraceReduction serves as the template for our reduced view of a java document, which stores only the information necessary for parenthesis matching.
Method Summary | |
int |
absOffset()
Get the absolute character offset of the document represented by BraceReduction. |
int |
balanceBackward()
Finds the open brace that matches the previous significant brace iff that brace is an closing brace. |
int |
balanceForward()
Finds the closing brace that matches the next significant brace iff that brace is an open brace. |
ReducedToken |
currentToken()
Get the current token in the BraceReduction. |
void |
delete(int count)
Update the BraceReduction to reflect text deletion. |
int |
getDistToNextNewline()
Gets distance to next new line. |
int |
getDistToPreviousNewline(int relativeLoc)
Gets distance to enclosing new line |
gj.util.Vector |
getHighlightStatus(int start,
int length)
Return all highlight status info for text between the current location and current location + end. |
IndentInfo |
getIndentInformation()
Gets the distance to the enclosing brace. |
ReducedModelState |
getStateAtCurrent()
Get the state of the token at the current cursor position. |
void |
insertChar(char ch)
Insert a character into the BraceReduction. |
void |
move(int count)
Updates the BraceReduction to reflect cursor movement. |
void |
resetLocation()
Resets the location of the walker in the comment list to where the current cursor is. |
String |
simpleString()
A simplified toString() method. |
ReducedModelState |
stateAtRelLocation(int relLocation)
Returns the state at the relLocation, where relLocation is the location relative to the walker |
Method Detail |
public int absOffset()
public ReducedToken currentToken()
public ReducedModelState getStateAtCurrent()
public void insertChar(char ch)
ch
- the character to be insertedpublic void move(int count)
Updates the BraceReduction to reflect cursor movement. Negative values move left from the cursor, positive values move right.
count
- indicates the direction and magnitude of cursor movementpublic void delete(int count)
Update the BraceReduction to reflect text deletion.
count
- indicates the size and direction of text deletion.
Negative values delete text to the left of the cursor, positive
values delete text to the right.public int balanceForward()
Finds the closing brace that matches the next significant brace iff that brace is an open brace.
#nextBrace()
public int balanceBackward()
Finds the open brace that matches the previous significant brace iff that brace is an closing brace.
#previousBrace()
public IndentInfo getIndentInformation()
public int getDistToPreviousNewline(int relativeLoc)
public int getDistToNextNewline()
public String simpleString()
public gj.util.Vector getHighlightStatus(int start, int length)
start
- The starting location of the area we want to get status of.
The reduced model is already at this position, but the
parameter is needed to determine the absolute positions
needed in the HighlightStatus objects we return.length
- How far should we generate info for?public ReducedModelState stateAtRelLocation(int relLocation)
relLocation
- distance from walker to get state at.public void resetLocation()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |