Bug 18377 - Tree.getSelection() could be better ordered
Summary: Tree.getSelection() could be better ordered
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.3 M2   Edit
Assignee: Steve Northover CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 153105
  Show dependency tree
 
Reported: 2002-05-30 16:41 EDT by Chris McLaren CLA
Modified: 2006-09-12 13:19 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris McLaren CLA 2002-05-30 16:41:30 EDT
consider three projects, 
say org.eclipse.ant, org.eclipse.lucene, and org.eclipse.xerces. 
open packages view
expand org.eclipse.lucene, then org.eclipse.xerces, then org.eclipse.ant. 
now select org.eclipse.ant/about.html, org.eclipse.lucene/about.html, and 
org.eclipse.xerces/about.html. 
from the task view, filter on 'any resource in same project'. 
click new task. 
notice the new task dialog shows the folder as org.eclipse.lucene. 
one might expect it to be org.eclipse.ant/about.html as it is both first in the 
top down order as well as the anchor selection, or perhaps 
org.eclipse.xerces/about.html as it is the lead selection.
Comment 1 Chris McLaren CLA 2002-05-30 16:42:26 EDT
For multiselect trees, it would be helpful if the result of Tree.getSelection() 
was guaranteed to be in an intuitive order from a user perspective, either top 
down in the tree or in order of selection by the user.

it seems that .getSelection() returns the selection in the order of the items 
field, which does not necessarily meet either of those criteria in a lazily 
populating or mutating tree.
Comment 2 Mike Wilson CLA 2002-05-31 09:33:54 EDT
This makes sense. I'm not sure if we can do anything about this for R2.0, 
but we'll investigate.
Comment 3 Steve Northover CLA 2002-05-31 12:05:06 EDT
It does make sense but we cannot guarantee the order of the selection on every 
platform.  I believe it's dangerous to try to enforce an order.  It could lead 
to performance problems or put us in a situation where there is no native API 
to implement what we want when porting to new platforms.
Comment 4 Silenio Quarti CLA 2006-08-28 11:47:30 EDT
Reopening for investigation.
Comment 5 Steve Northover CLA 2006-08-28 16:03:20 EDT
Fixed > 20060828