Rectangle bounds = table.getSelection()[0].getBounds();
Point pt = new Point(bounds.x, bounds.y);
int index = table.getTopIndex();
while (index < table.getItemCount()) {
boolean visible = false;
final SimpleTableItem item = (SimpleTableItem) table.getItem(index);
for (int i = 0; i < table.getColumnCount(); i++) {
Rectangle rect = item.getBounds(i);
if (rect.contains(pt)) {
final Text text = new Text(table, SWT.NONE);
Listener textListener = new TextListener(item, text);
text.addListener(SWT.FocusOut, textListener);
text.addListener(SWT.Traverse, textListener);
text.addListener(SWT.FocusOut, wizard);
editor.setEditor(text, item, i);
text.setText(item.getText(i));
text.selectAll();
text.setFocus();
return;
}
if (!visible && rect.intersects(clientArea)) {