use of net.sourceforge.pmd.util.fxdesigner.util.controls.ASTTreeItem in project pmd by pmd.
the class SourceEditorController method setUpToDateCompilationUnit.
private void setUpToDateCompilationUnit(Node node) {
astTitleLabel.setText("Abstract Syntax Tree");
ASTTreeItem root = ASTTreeItem.getRoot(node);
astTreeView.setRoot(root);
}
use of net.sourceforge.pmd.util.fxdesigner.util.controls.ASTTreeItem in project pmd by pmd.
the class SourceEditorController method focusNodeInTreeView.
public void focusNodeInTreeView(Node node) {
ASTTreeItem found = ((ASTTreeItem) astTreeView.getRoot()).findItem(node);
if (found != null) {
SelectionModel<TreeItem<Node>> selectionModel = astTreeView.getSelectionModel();
selectionModel.select(found);
astTreeView.getFocusModel().focus(selectionModel.getSelectedIndex());
// astTreeView.scrollTo(selectionModel.getSelectedIndex());
}
}
Aggregations