Bug 38414 - [Viewers] StructuredViewer.setSelection() fires if selection does not change
Summary: [Viewers] StructuredViewer.setSelection() fires if selection does not change
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Boris Bokowski CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-04 11:10 EDT by Dean Roberts CLA
Modified: 2007-06-19 15:27 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Roberts CLA 2003-06-04 11:10:03 EDT
The comment for StructureViewer.setSelection(ISelection, boolean) claims that
updateSelection is called only if the selection differs from the current 
selection.

The code looks like it does not implement this behaviour.  It seems that 
updateSelection is always called.

I don't know if the comment has just become stale, but I believe behaviour 
that matches the comment would be more beneficial than the existing behaviour.
Comment 1 Nick Edgar CLA 2003-06-10 15:13:30 EDT
The comment is stale.  It is sometimes necessary to be able to force 
notification of a selection change, e.g. when the program changes the selection 
at the SWT widget level (SWT does not send change events when things are 
changed programmatically).  This can be done using viewer.setSelection
(viewer.getSelection()).  It may be better to have special API to force a 
notification, rather than relying on the behaviour of setSelection.
Comment 2 Nick Edgar CLA 2006-03-15 11:47:41 EST
Reassigning bugs in component areas that are changing ownership.
Comment 3 Boris Bokowski CLA 2007-06-19 15:27:32 EDT
There are no plans to fix this.