Skip to main content



      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 18:38 Go to next message
Eclipse UserFriend
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 07:36 Go to previous messageGo to next message
Eclipse UserFriend
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 14:59 Go to previous messageGo to next message
Eclipse UserFriend
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 15:27 Go to previous messageGo to next message
Eclipse UserFriend
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 15:29 Go to previous messageGo to next message
Eclipse UserFriend
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 15:30 Go to previous message
Eclipse UserFriend
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: Wed Mar 12 07:17:03 EDT 2025

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

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

Back to the top