@Nonnull
	public EventHandler<? super MouseEvent> clickHandlerOf(@Nonnull TreeCell<?> cell, @Nonnull PathNode<?> item, boolean gotoNavigation) {
		return e -> {
			if (e.getButton() == MouseButton.PRIMARY) {
				// Double-clicking leafs should 'open' their content.
				// Branches should recursively open.
				TreeItem<?> treeItem = cell.getTreeItem();
				if (e.getClickCount() == 2 && treeItem != null)
					if (treeItem.isLeaf()) {
						if (gotoNavigation) openPath(item);
					}
					// I know that it looks odd, that we recurse-open when its already expanded
					// but in-practice this results in a more consistent desired behavior and less rapid re-closures.
					else if (treeItem.isExpanded()) {
						TreeItems.recurseOpen(treeItem);
					} else {
						TreeItems.recurseClose(cell.getTreeView(), treeItem);
					}
			}
		};
	}
@param cell
		Cell to apply click handling to.
@param item
		Content within the cell.
@param gotoNavigation
		Flag to include {@link Actions#gotoDeclaration(PathNode)} behavior on double-click.

@return An event handler for {@link Node#setOnMouseClicked(EventHandler)}
that handles generic click interactions with tree cells.
recaf-ui/src/main/java/software/coley/recaf/services/cell/CellConfigurationService.java