TreeTableTree tree = resultTableView.getTree();
TreeUtil.collapseAll(tree, 1);
}
public String getSelectedNodeStringifiedValue() {
JsonTreeNode lastSelectedResultNode = (JsonTreeNode) resultTableView.getTree().getLastSelectedPathComponent();
if (lastSelectedResultNode == null) {
lastSelectedResultNode = (JsonTreeNode) resultTableView.getTree().getModel().getRoot();
}
MongoNodeDescriptor userObject = lastSelectedResultNode.getDescriptor();
if (userObject instanceof MongoResultDescriptor) {
return stringifyResult(lastSelectedResultNode);
}
return userObject.toString();