Bug 218884 - [DataBinding] Add API: WorkbenchObservables
Summary: [DataBinding] Add API: WorkbenchObservables
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.5 M6   Edit
Assignee: Boris Bokowski CLA
QA Contact:
URL:
Whiteboard:
Keywords: api, helpwanted
Depends on:
Blocks:
 
Reported: 2008-02-13 16:57 EST by Boris Bokowski CLA
Modified: 2009-03-09 17:12 EDT (History)
3 users (show)

See Also:


Attachments
patch (13.01 KB, patch)
2009-03-09 00:23 EDT, Boris Bokowski CLA
no flags Details | Diff
better patch (19.24 KB, patch)
2009-03-09 00:45 EDT, Boris Bokowski CLA
no flags Details | Diff
Patch (20.29 KB, patch)
2009-03-09 17:01 EDT, Matthew Hall CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Bokowski CLA 2008-02-13 16:57:05 EST
... for things like listening to ISelectionService
Comment 1 Boris Bokowski CLA 2008-02-13 17:07:46 EST
No idea if I will have time for this, but if we want it in 3.4, it would have to happen fairly soon.
Comment 2 Boris Bokowski CLA 2008-03-24 02:53:17 EDT
Ran out of time.
Comment 3 Matthew Hall CLA 2009-01-21 23:27:30 EST
Don't we have to have a separate bundle with org.eclipse.ui as a dependency first?
Comment 4 Boris Bokowski CLA 2009-01-22 00:15:36 EST
(In reply to comment #3)
> Don't we have to have a separate bundle with org.eclipse.ui as a dependency
> first?

No - org.eclipse.ui.workbench has a dependency on core.databinding and jface.databinding already. We should put any new API in a separate package though.
Comment 5 Boris Bokowski CLA 2009-03-06 21:50:39 EST
Frank, quick - which API would you like to see? You have 24 hours for your answer... :-)
Comment 6 Boris Bokowski CLA 2009-03-08 12:32:55 EDT
going once...
Comment 7 Boris Bokowski CLA 2009-03-09 00:23:44 EDT
Created attachment 127983 [details]
patch

going twice... shout if you need more than this.
Comment 8 Boris Bokowski CLA 2009-03-09 00:45:10 EDT
Created attachment 127986 [details]
better patch

With this patch, you will be able to write (in a view, or an editor):

IObservableValue input = WorkbenchObservables.observeAdaptedSingleSelection(getSite(),IResource.class);
Observables.pipe(input, ViewersObservables.observeInput(myViewer));

Comments or questions?
Comment 9 Boris Bokowski CLA 2009-03-09 15:20:04 EDT
Matthew, +1?
Comment 10 Matthew Hall CLA 2009-03-09 17:01:35 EDT
Created attachment 128106 [details]
Patch

Added methods to WorkbenchProperties:

IValueProperty adaptedValue(Class adapter)
IValueProperty adaptedValue(Class adapter, IAdapterManager adapterManager)

Renamed WorkbenchObservables.observeAdaptedValue to observeDetailAdaptedValue since it receives an IObservableValue.
Comment 11 Boris Bokowski CLA 2009-03-09 17:12:24 EDT
Released to HEAD.