Community
Participate
Working Groups
Build Identifier: 1.3 The RAP 1.3 implementation of TreeItem.getBounds(int columnIndex) does not correctly treat the swapping of two columns. It does not take the swapping under consideration, as RCP does (tested with Eclipse 3.4). Which has the effect of getting the wrong cell editor. If considering fixing this bug, please specify whether this will be fixed for the old (1.3) Tree, or for the new one (1.4 - specified by Bug #309519)! Reproducible: Always Steps to Reproduce: 1. Having let's say a tree with at least 3 columns, having different cell editors for the columns at indexes 1 and 2 (first two after the column presenting the tree). Let-s say 1-st column is "name" and the 2-nd is "description" 2. swap the 2 columns (replace one with the other by dragging the header of "description" and dropping it right between the 0-indexed-tree-column and "name") 3. click on a cell in "name". You would expect now to edit the "name", but, unfortunately, the editor for "description" is activated. Why? Because: - in RCP: TreeItem.getBounds(1) returns the rectangle of the cell CURRENTLY under the column "name" - which now includes the mouse-down-pointer - in RAP: TreeItem.getBounds(1) returns the rectangle of the cell INITIALLY under the column "name"- which now DOES NOT include the mouse-down-pointer
I just tested with a Table instead of a Tree - everything works fine.
I've just tested moveable tree columns and TreeItem#getBounds( index ) against CVS HEAD (new Tree implementation) and it works as expected. The TreeItem#getBounds( index ) returns the bounds of the current tree cell position. I think that this issue has been fixed by Bug #309519. Bogdan, can you confirm this? Please, reopen this bug if the problem persist with CVS HEAD.
I added a code snippet for another bug, but which tests implicitly this bug too: https://bugs.eclipse.org/bugs/show_bug.cgi?id=324651#c5 That snippet confirms that this bug was fixed in 1.4M1.
I will reopen this bug as bounds are still wrong in case of scrolling.
The issue with scrolling is fixed in CVS HEAD.