|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deft.extension.tools.astlayouter.ASTLayout
public class ASTLayout
Representation of the complete layout behind a AST.
Constructor Summary | |
---|---|
ASTLayout(java.util.List<org.deft.repository.ast.TokenNode> tokenNodes)
|
Method Summary | |
---|---|
TokenLine |
getLine(int line)
|
TokenLine |
getLine(org.deft.repository.ast.Token t)
|
java.lang.Integer |
getNextValidLine(int current)
|
int |
getPreviousRealLine(int current)
|
java.lang.Integer |
getPreviousValidLine(int current)
|
int |
lastLine()
|
void |
moveCol(int selectedLine,
int offset)
Moves a line in horizontal direction. |
void |
moveLinesAfterLine(int targetLine,
int offset)
Moves tokens after a line by a given line offset. |
void |
moveLinesBeginningByToken(org.deft.repository.ast.Token token,
int offset)
Moves tokens by a given line offset. |
void |
reload(java.util.List<org.deft.repository.ast.TokenNode> tokenNodes)
Reloads a AST (i.e. after modification) without recalculating the line break width. |
void |
repairOffset()
Recalculates the offset of each token in the layout. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ASTLayout(java.util.List<org.deft.repository.ast.TokenNode> tokenNodes)
Method Detail |
---|
public void reload(java.util.List<org.deft.repository.ast.TokenNode> tokenNodes)
tokenNodes
- serialized ASTpublic void repairOffset()
public TokenLine getLine(int line)
line
- line index
public TokenLine getLine(org.deft.repository.ast.Token t)
t
- in line
public java.lang.Integer getNextValidLine(int current)
current
- current line index
public java.lang.Integer getPreviousValidLine(int current)
current
- current line index
public int getPreviousRealLine(int current)
current
- current line index
public void moveLinesBeginningByToken(org.deft.repository.ast.Token token, int offset)
token
- Tokenoffset
- linespublic void moveLinesAfterLine(int targetLine, int offset)
targetLine
- line indexoffset
- linespublic void moveCol(int selectedLine, int offset)
selectedLine
- indexoffset
- colspublic int lastLine()
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 |