Home » Modeling » EMF » EMF Databinding with EMFObservables and Editing Domain
| | | |
Re: EMF Databinding with EMFObservables and Editing Domain [message #430703 is a reply to message #430702] |
Thu, 04 June 2009 15:14 |
Waldi Messages: 60 Registered: July 2009 |
Member |
|
|
Okay all is running fine, only one short problem: If I change a text, the
treeViewer doesn't reakt and the domain doesnt become dirty. I've changed
nothing, only the DateTimes. Is it sure there isn't a bug?
Another question: What is this for a number? 262160.
Can you give me a tip how I can find the example from which you talk?
Here is my Code again to observe the EditingDomain
tThema = new Text(composite2, SWT.NONE);
tThema.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
IEMFEditValueProperty prop =
EMFEditProperties.value(p.getEditingDomain(),
ZlvpPackage.Literals.LAGER__THEMA);
IObservableValue uObs = prop.observeDetail(viewerSelection);
dbc.bindValue(SWTObservables.observeDelayedValue(400,
(ISWTObservableValue) textProp.observe(tThema)), uObs);
"Tom Schindl" <tom.schindl@bestsolution.at> schrieb im Newsbeitrag
news:h08jtc$pri$1@build.eclipse.org...
> Hi Waldi,
>
> Yes but this might change in 2.6 if we manage to come up with a
> properties implementation for the resource-content.
>
> This would make the EMFObservables-Class and others unneeded and we
> would deprecate and probably even remove them if we manage to add this
> support say for M1 or M2.
>
> If you want get more background information you can take a look at
> 262160 which holds the implementation history of this support.
>
> Tom
>
> Waldi schrieb:
>> Thanks a lot for your answer. I will look aft RC2 or 3 One short question
>> for you: EMFObservables.observeResourceContents(doGetResource()); How is
>> the
>> new way observe resources? Is it fixed in RC2 to?
>> "Tom Schindl" <tom.schindl@bestsolution.at> schrieb im Newsbeitrag
>> news:h08i4d$6en$1@build.eclipse.org...
>>> Hi,
>>>
>>> Which version of EMF are you using? You need to use 2.5 RC2 or RC3. The
>>> versions before don't have support for Databinding-Properties.
>>>
>>> I've worked on an example in last weeks and there's going to be a
>>> blog-series about it in the next weeks.
>>>
>>> The example source code is already available from CVS if you are
>>> interested.
>>>
>>> Tom
>>>
>>> Waldi schrieb:
>>>> Normaly I do the Databinding in the same way like Tom's EMF Databinding
>>>> example:
>>>>
>>>> IWidgetValueProperty textProp;
>>>> IWidgetValueProperty dateProp;
>>>>
>>>> textProp = WidgetProperties.text();
>>>> dateProp = WidgetProperties.selection();
>>>>
>>>> IEMFEditValueProperty prop =
>>>> EMFEditProperties.value(p.getEditingDomain(),
>>>> ZlvpPackage.Literals.LAGER__THEMA);
>>>> IObservableValue uObs = prop.observeDetail(viewerSelection);
>>>> dbc.bindValue(SWTObservables.observeDelayedValue(400,
>>>> (ISWTObservableValue) textProp.observe(tThema)), uObs);
>>>> Now, I use a new eclipse Version because the new JFace Version kann
>>>> bind
>>>> SWT.DateTime. Now, IEMFEdit is no longer available.can you help me and
>>>> give
>>>> me a short example how I can do it without IEMFEdit???
>>>>
>>>>
>>
>>
|
|
| |
Re: EMF Databinding with EMFObservables and Editing Domain [message #430717 is a reply to message #430704] |
Thu, 04 June 2009 19:05 |
Waldi Messages: 60 Registered: July 2009 |
Member |
|
|
Ok, fine, now all is running. It works like a charm. It was my fault I
forgot to set the date attribute to date.... I'm a newbie....
The example project from which you speak is it the library example? I
work with it... It is realy good. A big compliment to you.
I know the bug but what can I do? waiting ;-) It's ok... I have time.
Tom Schindl schrieb:
> Waldi schrieb:
>> Okay all is running fine, only one short problem: If I change a text, the
>> treeViewer doesn't reakt and the domain doesnt become dirty. I've changed
>> nothing, only the DateTimes. Is it sure there isn't a bug?
>> Another question: What is this for a number? 262160.
>
> It's a bug id.
>
>> Can you give me a tip how I can find the example from which you talk?
>>
>> Here is my Code again to observe the EditingDomain
>>
>> tThema = new Text(composite2, SWT.NONE);
>> tThema.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
>>
>> IEMFEditValueProperty prop =
>> EMFEditProperties.value(p.getEditingDomain(),
>> ZlvpPackage.Literals.LAGER__THEMA);
>> IObservableValue uObs = prop.observeDetail(viewerSelection);
>> dbc.bindValue(SWTObservables.observeDelayedValue(400,
>> (ISWTObservableValue) textProp.observe(tThema)), uObs);
>>
>
> I have no idea. My wild guess is that because you are not setting any
> converters the default ones are used and then you need to use a
> ISO-Format for input which is yyyy-mm-dd.
>
> Please also note you'll have to use an EMFDatabindingContext because
> EMF-Databinding returns the EStructuralFeature as type from the observables.
>
> You can check out my example project from CVS and reuse the converters
> I've written there.
>
> Because we are at it and you are using dates in a master-detail scenario
> I have to point you to a nasty bug [1] which failed the inclusion in 3.5!
>
> Tom
>
> [1]https://bugs.eclipse.org/bugs/show_bug.cgi?id=278301
|
|
|
Re: EMF Databinding with EMFObservables and Editing Domain [message #430719 is a reply to message #430717] |
Thu, 04 June 2009 23:12 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
Hi Waldi,
Well it depends the Libary example is the one I worked on for my
EclipseCon presentation. The one I talked about in this mail is the one
you can fetch from EMF-CVS
(cvsroot/org.eclipse.emf/org.eclipse.emf/examples/org.eclips e.emf.examples.databinding.*).
It's a completely running RCP-Application showing the complete
EMF-Databinding API.
In the next few days/weeks I'm going to run a blog series [1] about
EMF-Databinding which might give you a jump start into the whole topic.
The bug I referenced is *NOT* going to be fixed in 3.5.0 and because the
code part it is in is a really dangerous it might not get fixed in 3.5.x.
We are currently working on documenting an work around using the public
API but we haven't come to a final conclusion what we are going to
propose to our customers.
The regression I talked about in the is there since 2007 and nobody came
across it (until I came across :-) though I think the use case I
described is not that unusual.
To get informed about solutions I'd suggest that you subscribe to the
bug report so that you see what's going on.
Tom
[1]http://tomsondev.bestsolution.at
Waldi Waldemar schrieb:
> Ok, fine, now all is running. It works like a charm. It was my fault I
> forgot to set the date attribute to date.... I'm a newbie....
>
> The example project from which you speak is it the library example? I
> work with it... It is realy good. A big compliment to you.
>
> I know the bug but what can I do? waiting ;-) It's ok... I have time.
>
> Tom Schindl schrieb:
>> Waldi schrieb:
>>> Okay all is running fine, only one short problem: If I change a text,
>>> the treeViewer doesn't reakt and the domain doesnt become dirty. I've
>>> changed nothing, only the DateTimes. Is it sure there isn't a bug?
>>> Another question: What is this for a number? 262160.
>>
>> It's a bug id.
>>
>>> Can you give me a tip how I can find the example from which you talk?
>>>
>>> Here is my Code again to observe the EditingDomain
>>>
>>> tThema = new Text(composite2, SWT.NONE);
>>> tThema.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
>>>
>>> IEMFEditValueProperty prop =
>>> EMFEditProperties.value(p.getEditingDomain(),
>>> ZlvpPackage.Literals.LAGER__THEMA);
>>> IObservableValue uObs = prop.observeDetail(viewerSelection);
>>> dbc.bindValue(SWTObservables.observeDelayedValue(400,
>>> (ISWTObservableValue) textProp.observe(tThema)), uObs);
>>>
>>
>> I have no idea. My wild guess is that because you are not setting any
>> converters the default ones are used and then you need to use a
>> ISO-Format for input which is yyyy-mm-dd.
>>
>> Please also note you'll have to use an EMFDatabindingContext because
>> EMF-Databinding returns the EStructuralFeature as type from the
>> observables.
>>
>> You can check out my example project from CVS and reuse the converters
>> I've written there.
>>
>> Because we are at it and you are using dates in a master-detail scenario
>> I have to point you to a nasty bug [1] which failed the inclusion in 3.5!
>>
>> Tom
>>
>> [1]https://bugs.eclipse.org/bugs/show_bug.cgi?id=278301
|
|
|
Goto Forum:
Current Time: Fri Mar 29 02:17:15 GMT 2024
Powered by FUDForum. Page generated in 0.01987 seconds
|