|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BraceReduction
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 |
getDistToStart(int relativeLoc)
Gets distance to enclosing new line |
ArrayList<HighlightStatus> |
getHighlightStatus(int start,
int length)
Return all highlight status info for text between the current location and current location + end. |
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. |
ReducedModelState |
moveWalkerGetState(int relLocation)
Returns the state at the relLocation, where relLocation is the location relative to the walker |
void |
resetLocation()
Resets the location of the walker in the comment list to where the current cursor is. |
String |
simpleString()
A simplified toString() method. |
Method Detail |
---|
int absOffset()
ReducedToken currentToken()
ReducedModelState getStateAtCurrent()
void insertChar(char ch)
ch
- the character to be insertedvoid 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 movementvoid 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.int balanceForward()
Finds the closing brace that matches the next significant brace iff that brace is an open brace.
balanceBackward()
int balanceBackward()
Finds the open brace that matches the previous significant brace iff that brace is an closing brace.
balanceForward()
int getDistToStart(int relativeLoc)
int getDistToNextNewline()
String simpleString()
ArrayList<HighlightStatus> getHighlightStatus(int start, int length)
start
- The start location of the area being inspected. The reduced model cursor is already located at this
position, but the parameter is needed to determine the absolute positions needed in the
HighlightStatus objects we return.length
- The length of the text area being inspected.ReducedModelState moveWalkerGetState(int relLocation)
relLocation
- distance from walker to get state at.void resetLocation()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |