Bug 444724

Summary: Tree.getItem(Point): optionally ignore SWT.FULL_SELECTION
Product: [Eclipse Project] Platform Reporter: Thomas Singer <eclipse>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: major    
Priority: P3 CC: nikita
Version: 4.5   
Target Milestone: ---   
Hardware: PC   
OS: Windows NT   
Whiteboard:

Description Thomas Singer CLA 2014-09-22 08:02:11 EDT
Currently, Tree.getItem(Point) only returns the item, if it is inside the item's bounding box - unless SWT.FULL_SECTION is specified (which we can't use because of bug #438479). For an own TreeDropTargetEffect we need Tree.getItem(Point) to only use the y-coordinate.

Suggestion: introduce an overloaded Tree.getItem(Point, boolean) that only depending on the second parameter checks the x-coordinate. Make the existing Tree.getItem(Point) path to the new Tree.getItem(Point, boolean) using the SWT.FULL_SECTION check.
Comment 1 Thomas Singer CLA 2014-09-22 08:04:28 EDT
We currently have to iterate over all visible tree items calculating their bounds - which, as you can imagine, is VERY slow.