Class CodeSelectorPresentation
java.lang.Object
com.puppycrawl.tools.checkstyle.gui.CodeSelectorPresentation
Presentation model for CodeSelector.
-
Field Summary
FieldsModifier and TypeFieldDescriptionMapping.private final ObjectDetailAST or DetailNode node.private intSelection end position.private intSelection start position. -
Constructor Summary
ConstructorsConstructorDescriptionCodeSelectorPresentation(DetailAST ast, List<Integer> lines2position) Constructor.CodeSelectorPresentation(DetailNode node, List<Integer> lines2position) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprivate intfindLastPosition(DetailAST astNode) Finds the last position of node without children.private intfindLastPosition(DetailNode detailNode) Finds the last position of node without children.voidFind start and end selection positions from AST line and Column.private voidFind start and end selection positions from AST line and Column.private voidfindSelectionPositions(DetailNode detailNode) Find start and end selection positions from DetailNode line and Column.intReturns selection end position.intReturns selection start position.
-
Field Details
-
node
DetailAST or DetailNode node. -
lines2position
Mapping. -
selectionStart
Selection start position. -
selectionEnd
Selection end position.
-
-
Constructor Details
-
CodeSelectorPresentation
Constructor.- Parameters:
ast- ast node.lines2position- positions of lines.
-
CodeSelectorPresentation
Constructor.- Parameters:
node- DetailNode node.lines2position- list to map lines.
-
-
Method Details
-
getSelectionStart
Returns selection start position.- Returns:
- selection start position.
-
getSelectionEnd
Returns selection end position.- Returns:
- selection end position.
-
findSelectionPositions
Find start and end selection positions from AST line and Column. -
findSelectionPositions
Find start and end selection positions from AST line and Column.- Parameters:
ast- DetailAST node for which selection finds
-
findSelectionPositions
Find start and end selection positions from DetailNode line and Column.- Parameters:
detailNode- DetailNode node for which selection finds
-
findLastPosition
Finds the last position of node without children.- Parameters:
astNode- DetailAST node.- Returns:
- Last position of node without children.
-
findLastPosition
Finds the last position of node without children.- Parameters:
detailNode- DetailNode node.- Returns:
- Last position of node without children.
-