Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » [databinding] MappedSet and BidiObservableMap
[databinding] MappedSet and BidiObservableMap [message #498047] Fri, 13 November 2009 20:42 Go to next message
Enrico Schnepel is currently offline Enrico SchnepelFriend
Messages: 121
Registered: July 2009
Senior Member
Hello,

this is a bit off-topic because it is not JFace related but I haven't
found a databinding related newsgroup. I want to replace a MappedSet I
am currently using with a BidiObservableMap. Not only because it is
recommended since e3.4 but for now I need the mapping too. There is a
lot of ducumentation available stating to use the BidiObservableMap
instead of the MappedSet but not stating what I am supposed to do to. My
current scenario is that I am using a ComputedObservableMap as the
mapping for the MappedSet. I simply want two synced ObservableSets with
a mapping inbetween.

Any Suggestion?

Thanks in advance

Enrico
Re: [databinding] MappedSet and BidiObservableMap [message #507723 is a reply to message #498047] Thu, 14 January 2010 13:25 Go to previous messageGo to next message
Enrico Schnepel is currently offline Enrico SchnepelFriend
Messages: 121
Registered: July 2009
Senior Member
Any idea?

Enrico

"Enrico Schnepel" <enrico.schnepel@randomice.net> schrieb im Newsbeitrag
news:hdkgbl$lpg$1@build.eclipse.org...
> Hello,
>
> this is a bit off-topic because it is not JFace related but I haven't
> found a databinding related newsgroup. I want to replace a MappedSet I am
> currently using with a BidiObservableMap. Not only because it is
> recommended since e3.4 but for now I need the mapping too. There is a lot
> of ducumentation available stating to use the BidiObservableMap instead of
> the MappedSet but not stating what I am supposed to do to. My current
> scenario is that I am using a ComputedObservableMap as the mapping for the
> MappedSet. I simply want two synced ObservableSets with a mapping
> inbetween.
>
> Any Suggestion?
>
> Thanks in advance
>
> Enrico
Re: [databinding] MappedSet and BidiObservableMap [message #508253 is a reply to message #507723] Mon, 18 January 2010 06:58 Go to previous message
Matthew Hall is currently offline Matthew HallFriend
Messages: 368
Registered: July 2009
Senior Member
MappedSet was introduced before my time, I'm not sure what it does so I
can't advise you there.

BidiObservableMap is just an IObservableMap where you can query the set
of keys which map to a given value. It does not enforce a one-to-one
relationship between keys and values.

If you're just trying to keep two IObservableSets in sync I recommend
taking a look at DataBindingContext.bindSet(). If there is some kind of
type conversion you will want to set a converter on both the
target-to-model and model-to-target update strategies.

Matthew

Enrico Schnepel wrote:
>> this is a bit off-topic because it is not JFace related but I haven't
>> found a databinding related newsgroup. I want to replace a MappedSet I am
>> currently using with a BidiObservableMap. Not only because it is
>> recommended since e3.4 but for now I need the mapping too. There is a lot
>> of ducumentation available stating to use the BidiObservableMap instead of
>> the MappedSet but not stating what I am supposed to do to. My current
>> scenario is that I am using a ComputedObservableMap as the mapping for the
>> MappedSet. I simply want two synced ObservableSets with a mapping
>> inbetween.
Previous Topic:Re: Looking for JFace Databinding Approach
Next Topic:Slow horizontal scrolling?
Goto Forum:
  


Current Time: Fri Apr 26 14:53:43 GMT 2024

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

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

Back to the top