* @param indices the indices to select.
* @return this same instance.
*/
public SWTBotTree select(final int... indices) {
assertEnabled();
asyncExec(new VoidResult() {
public void run() {
log.debug(MessageFormat.format("Selecting rows [{0}] in tree{1}", StringUtils.join(indices, ", "), this)); //$NON-NLS-1$ //$NON-NLS-2$
if (hasStyle(widget, SWT.MULTI) && indices.length > 1)
log.warn("Tree does not support SWT.MULTI, cannot make multiple selections"); //$NON-NLS-1$
TreeItem items[] = new TreeItem[indices.length];