public class CodeSelectorPresentation
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.List<java.lang.Integer> |
lines2position
Mapping.
|
private java.lang.Object |
node
DetailAST or DetailNode node.
|
private int |
selectionEnd
Selection end position.
|
private int |
selectionStart
Selection start position.
|
Constructor and Description |
---|
CodeSelectorPresentation(DetailAST ast,
java.util.List<java.lang.Integer> lines2position)
Constructor.
|
CodeSelectorPresentation(DetailNode node,
java.util.List<java.lang.Integer> lines2position)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private int |
findLastPosition(DetailAST astNode)
Finds the last position of node without children.
|
private int |
findLastPosition(DetailNode detailNode)
Finds the last position of node without children.
|
void |
findSelectionPositions()
Find start and end selection positions from AST line and Column.
|
private void |
findSelectionPositions(DetailAST ast)
Find start and end selection positions from AST line and Column.
|
private void |
findSelectionPositions(DetailNode detailNode)
Find start and end selection positions from DetailNode line and Column.
|
int |
getSelectionEnd()
Returns selection end position.
|
int |
getSelectionStart()
Returns selection start position.
|
private final java.lang.Object node
private final java.util.List<java.lang.Integer> lines2position
private int selectionStart
private int selectionEnd
public CodeSelectorPresentation(DetailAST ast, java.util.List<java.lang.Integer> lines2position)
ast
- ast node.lines2position
- list to map lines.public CodeSelectorPresentation(DetailNode node, java.util.List<java.lang.Integer> lines2position)
node
- DetailNode node.lines2position
- list to map lines.public int getSelectionStart()
public int getSelectionEnd()
public void findSelectionPositions()
private void findSelectionPositions(DetailAST ast)
ast
- DetailAST node for which selection findsprivate void findSelectionPositions(DetailNode detailNode)
detailNode
- DetailNode node for which selection findsprivate int findLastPosition(DetailAST astNode)
astNode
- DetailAST node.private int findLastPosition(DetailNode detailNode)
detailNode
- DetailNode node.