Bug 169997 [CellEditors] TableViewer doesn't activate TextCellEditor consistently
A TextCellEditor is not activated consistently in a TableViewer if the cell clicked is not in the currently selected row. Running the sample application in a debugger, the bounds reported for the table item appears to be incorrect for the column when the row is not selected. This behaviour can be observed by setting a breakpoint at TableEditorImpl.java line 135 (the if statement doesn't return true unless the row is selected due to the bounds being incorrect): if (bounds.contains(event.x, event.y)) {
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/TreeViewer.java
}
	/**
	 * Fix for bug 185673: If the currently replaced item was selected, add it
	 * to the selection that is being restored. Only do this if its getData() is
	 * currently null
	 *
	 * @param selectedItems
	 * @param selection
	 * @param item
	 * @param element
	 * @return
	 */
	private TreeSelection adjustSelectionForReplace(Item[] selectedItems,
			TreeSelection selection, TreeItem item, Object element, Object parentElement) {
		if (item.getData() != null || selectedItems.length == selection.size()
				|| parentElement == null) {
			
			return selection;
		}
		for (int i = 0; i < selectedItems.length; i++) {
			if (item == selectedItems[i]) {
				
				
				
				TreePath[] originalPaths = selection.getPaths();
				int length = originalPaths.length;
				TreePath[] paths = new TreePath[length + 1];
				System.arraycopy(originalPaths, 0, paths, 0, length);
				
				item.setData(element);