Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » [DataBindings] How to create a heterogeneous list of observables?
[DataBindings] How to create a heterogeneous list of observables? [message #335743] Fri, 24 April 2009 22:38 Go to next message
Jon Barrilleaux is currently offline Jon BarrilleauxFriend
Messages: 25
Registered: July 2009
Junior Member
I'm trying to create a content provider for a common navigator view.
I'm using ObservableListTreeContentProvider as the base class. Certain
levels of the tree require a heterogeneous mix of observable objects --
a single value from one source, and a list from another source, combined
and returned as an observable list for the content provider factory.

I attempted to use a ComputedList to do this, in several different ways,
but they all resulted in a wrong realm exception (deep in the bowels of
the databinding execution Display.getCurrent() returns null at some
point, which does not match the current non-null display for the realm).

Any suggestions on what is the best way to create a heterogeneous
observable list? Any suggestions on why ComputedList failed (it seemed
like the best way to achieve this)?
Re: [DataBindings] How to create a heterogeneous list of observables? [message #335746 is a reply to message #335743] Sat, 25 April 2009 11:36 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi,

This is not possible with 3.4 but will be IIRC with 3.5 (Matt Hall can
correct me). The only possibility I found in 3.4 was to use the
EMF-Implementation of Eclipse-Databinding and patch it (it's a one liner
and if you use EMF I could give it to you).

If Display.current() returns null it looks like you creating the
ComputedList outside the UI-Thread and so there's no realm available but
it would solve your problem because the real problem is the
ObservableMap you need to generate.

Tom

Jon Barrilleaux schrieb:
> I'm trying to create a content provider for a common navigator view. I'm
> using ObservableListTreeContentProvider as the base class. Certain
> levels of the tree require a heterogeneous mix of observable objects --
> a single value from one source, and a list from another source, combined
> and returned as an observable list for the content provider factory.
>
> I attempted to use a ComputedList to do this, in several different ways,
> but they all resulted in a wrong realm exception (deep in the bowels of
> the databinding execution Display.getCurrent() returns null at some
> point, which does not match the current non-null display for the realm).
>
> Any suggestions on what is the best way to create a heterogeneous
> observable list? Any suggestions on why ComputedList failed (it seemed
> like the best way to achieve this)?
Re: [DataBindings] How to create a heterogeneous list of observables? [message #335756 is a reply to message #335743] Mon, 27 April 2009 18:59 Go to previous messageGo to next message
Matthew Hall is currently offline Matthew HallFriend
Messages: 368
Registered: July 2009
Senior Member
Jon,

Please copy paste the code you use to set up your viewer bindings and
that should help to diagnose your problem.

Matthew

Jon Barrilleaux wrote:
> I'm trying to create a content provider for a common navigator view. I'm
> using ObservableListTreeContentProvider as the base class. Certain
> levels of the tree require a heterogeneous mix of observable objects --
> a single value from one source, and a list from another source, combined
> and returned as an observable list for the content provider factory.
>
> I attempted to use a ComputedList to do this, in several different ways,
> but they all resulted in a wrong realm exception (deep in the bowels of
> the databinding execution Display.getCurrent() returns null at some
> point, which does not match the current non-null display for the realm).
>
> Any suggestions on what is the best way to create a heterogeneous
> observable list? Any suggestions on why ComputedList failed (it seemed
> like the best way to achieve this)?
Re: [DataBindings] How to create a heterogeneous list of observables? [message #335768 is a reply to message #335756] Tue, 28 April 2009 19:27 Go to previous messageGo to next message
Jon Barrilleaux is currently offline Jon BarrilleauxFriend
Messages: 25
Registered: July 2009
Junior Member
Matthew Hall wrote:
> Jon,
>
> Please copy paste the code you use to set up your viewer bindings and
> that should help to diagnose your problem.
>
> Matthew
>
This matter is currently being discussed via a bug (actually a non-bug)
filed in bugzilla. Those that are interested should go to bug 273648.

Essentially, ComputedList can be used for this purpose, but how and why
is unclear from the current javadoc.

--jon
Re: [DataBindings] How to create a heterogeneous list of observables? [message #335769 is a reply to message #335756] Tue, 28 April 2009 19:29 Go to previous messageGo to next message
Jon Barrilleaux is currently offline Jon BarrilleauxFriend
Messages: 25
Registered: July 2009
Junior Member
Matthew Hall wrote:
> Jon,
>
> Please copy paste the code you use to set up your viewer bindings and
> that should help to diagnose your problem.
>
> Matthew
>
This matter is currently being discussed via a bug (actually a non-bug)
filed in bugzilla. Those that are interested should go to bug 273648.

Essentially, ComputedList can be used for this purpose, but how and why
is unclear from the current javadoc.

--jon
Re: [DataBindings] How to create a heterogeneous list of observables? [message #335770 is a reply to message #335756] Tue, 28 April 2009 19:30 Go to previous message
Jon Barrilleaux is currently offline Jon BarrilleauxFriend
Messages: 25
Registered: July 2009
Junior Member
Matthew Hall wrote:
> Jon,
>
> Please copy paste the code you use to set up your viewer bindings and
> that should help to diagnose your problem.
>
> Matthew
>
This matter is currently being discussed via a bug (actually a non-bug)
filed in bugzilla. Those that are interested should go to bug 273648.

Essentially, ComputedList can be used for this purpose, but how and why
is unclear from the current javadoc.

--jon
Previous Topic:Can't uninstall plug-in in eclipse-3.4
Next Topic:Reusing the Tabbed Properties
Goto Forum:
  


Current Time: Thu Mar 28 22:47:42 GMT 2024

Powered by FUDForum. Page generated in 0.04557 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top