Bug 570214 - [Databinding] WorkbenchProperties#singleSelection does not work for sets and lists
Summary: [Databinding] WorkbenchProperties#singleSelection does not work for sets and ...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.19   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-09 08:21 EST by Jens Lideström CLA
Modified: 2021-01-09 08:22 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Lideström CLA 2021-01-09 08:21:27 EST
SelectionServiceListener has a bug whereby it incorrectly passes a IWorkbenchPart instead of a ISelectionService as the source object to fireChange.

This has no consequences for the standard case, when WorkbenchProperties#singleSelection is used to produce an observable value, because SimplePropertyObservableValue ignores the source parameter.

But when WorkbenchProperties#singleSelection is used to produce a observable list of set it results in ClassCastExceptions in SelectionServiceListener, when the source is cased to ISelectionService.

The fundamental problem is that there is no good way to use SimpleValueProperty when the listener does not have access to the source object.