Home » Modeling » GMF (Graphical Modeling Framework) » TransactionalEditingDomain prohibits adaption to EObject in other editing domain
TransactionalEditingDomain prohibits adaption to EObject in other editing domain [message #78862] |
Mon, 20 November 2006 09:08  |
Eclipse User |
|
|
|
Hi runtime team (maybe Christian Damus is the expert I need),
I want an EditPart to adapt to an EObject of another editing domain.
This I would like to do in the initial GraphicalEditPart.refresh().
However, the parent edit part does everything in an
getEditingDomain().runExclusive() transaction and the
TransactionalEditingDomain seems to prohibit to add the EditPart to the
list of adapters (even of another editing domain).
Any hints how I can solve my problem?
Thanks,
Henrik
|
|
| | |
Re: TransactionalEditingDomain prohibits adaption to EObject in other editing domain [message #81374 is a reply to message #81101] |
Tue, 28 November 2006 10:50   |
Eclipse User |
|
|
|
Hi Cherie,
in the editing domain that belongs to the semantic model on top of which
the diagram lives, I have a weak reference to an element of another
editing domain. The reference is weak in the sense, that I use uuids for
that purpose.
Now I would like to make my edit part an adapter (i.e. change listener)
of the weakly referenced element (or its parent) in the other editing
domain. This would be a simple and general way to update my label if the
other model element changes.
I hope I could make clear my situation.
Thanks,
Henrik
Cherie Revells wrote:
> Hi Henrik,
>
> We do make assumptions throughout the GMF runtime code that everything
> on the diagram (notational and semantic) shares the same editing domain.
> If you have one editpart whose semantic element is in another editing
> domain, this may cause problems in the GMF runtime. Maybe I can help
> you more if I know what you are trying to accomplish?
>
> Regards,
> Cherie
>
> Henrik Rentz-Reichert wrote:
>> Hi runtime team (maybe Christian Damus is the expert I need),
>>
>> I want an EditPart to adapt to an EObject of another editing domain.
>> This I would like to do in the initial GraphicalEditPart.refresh().
>> However, the parent edit part does everything in an
>> getEditingDomain().runExclusive() transaction and the
>> TransactionalEditingDomain seems to prohibit to add the EditPart to the
>> list of adapters (even of another editing domain).
>>
>> Any hints how I can solve my problem?
>>
>> Thanks,
>> Henrik
|
|
|
Re: TransactionalEditingDomain prohibits adaption to EObject in other editing domain [message #81745 is a reply to message #81374] |
Wed, 29 November 2006 12:15   |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Henrik,
How does the TransactionalEditingDomain prevent the attachment of an
adapter? Do you mean that adding an Adapter to the Notifier.eAdapters list
fails?
Cheers,
Christian
Henrik Rentz-Reichert wrote:
> Hi Cherie,
>
> in the editing domain that belongs to the semantic model on top of which
> the diagram lives, I have a weak reference to an element of another
> editing domain. The reference is weak in the sense, that I use uuids for
> that purpose.
> Now I would like to make my edit part an adapter (i.e. change listener)
> of the weakly referenced element (or its parent) in the other editing
> domain. This would be a simple and general way to update my label if the
> other model element changes.
>
> I hope I could make clear my situation.
>
> Thanks,
> Henrik
>
> Cherie Revells wrote:
>> Hi Henrik,
>>
>> We do make assumptions throughout the GMF runtime code that everything
>> on the diagram (notational and semantic) shares the same editing domain.
>> If you have one editpart whose semantic element is in another editing
>> domain, this may cause problems in the GMF runtime. Maybe I can help
>> you more if I know what you are trying to accomplish?
>>
>> Regards,
>> Cherie
>>
>> Henrik Rentz-Reichert wrote:
>>> Hi runtime team (maybe Christian Damus is the expert I need),
>>>
>>> I want an EditPart to adapt to an EObject of another editing domain.
>>> This I would like to do in the initial GraphicalEditPart.refresh().
>>> However, the parent edit part does everything in an
>>> getEditingDomain().runExclusive() transaction and the
>>> TransactionalEditingDomain seems to prohibit to add the EditPart to the
>>> list of adapters (even of another editing domain).
>>>
>>> Any hints how I can solve my problem?
>>>
>>> Thanks,
>>> Henrik
|
|
|
Re: TransactionalEditingDomain prohibits adaption to EObject in other editing domain [message #81953 is a reply to message #81745] |
Thu, 30 November 2006 12:05   |
Eclipse User |
|
|
|
Hi Christian,
I digged again into this issue and finally found the error. From former
experiences and the fact that I failed in TransactionalEditingDomain I
was mislead in my assumptions on the nature of the problem.
Now I realized, it was just that I tried to add an object to the
Notifier.eAdapters() list that was no Adapter and thus encountered an
ArrayStoreException.
Finally I came up with a simple proxy object derived from AdapterImpl
which just forwards the notification to my EditPart's
handleNotificationEvent(Notification notification) method and everything
works fine :-)
Thanks for your reply that helped me to find the solution,
Henrik
Christian W. Damus wrote:
> Hi, Henrik,
>
> How does the TransactionalEditingDomain prevent the attachment of an
> adapter? Do you mean that adding an Adapter to the Notifier.eAdapters list
> fails?
>
> Cheers,
>
> Christian
>
>
> Henrik Rentz-Reichert wrote:
>
>> Hi Cherie,
>>
>> in the editing domain that belongs to the semantic model on top of which
>> the diagram lives, I have a weak reference to an element of another
>> editing domain. The reference is weak in the sense, that I use uuids for
>> that purpose.
>> Now I would like to make my edit part an adapter (i.e. change listener)
>> of the weakly referenced element (or its parent) in the other editing
>> domain. This would be a simple and general way to update my label if the
>> other model element changes.
>>
>> I hope I could make clear my situation.
>>
>> Thanks,
>> Henrik
>>
>> Cherie Revells wrote:
>>> Hi Henrik,
>>>
>>> We do make assumptions throughout the GMF runtime code that everything
>>> on the diagram (notational and semantic) shares the same editing domain.
>>> If you have one editpart whose semantic element is in another editing
>>> domain, this may cause problems in the GMF runtime. Maybe I can help
>>> you more if I know what you are trying to accomplish?
>>>
>>> Regards,
>>> Cherie
>>>
>>> Henrik Rentz-Reichert wrote:
>>>> Hi runtime team (maybe Christian Damus is the expert I need),
>>>>
>>>> I want an EditPart to adapt to an EObject of another editing domain.
>>>> This I would like to do in the initial GraphicalEditPart.refresh().
>>>> However, the parent edit part does everything in an
>>>> getEditingDomain().runExclusive() transaction and the
>>>> TransactionalEditingDomain seems to prohibit to add the EditPart to the
>>>> list of adapters (even of another editing domain).
>>>>
>>>> Any hints how I can solve my problem?
>>>>
>>>> Thanks,
>>>> Henrik
>
|
|
|
Re: TransactionalEditingDomain prohibits adaption to EObject in other editing domain [message #82011 is a reply to message #81953] |
Thu, 30 November 2006 13:24  |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
No problem! I'm glad you've got it working.
Cheers,
Christian
Henrik Rentz-Reichert wrote:
> Hi Christian,
>
> I digged again into this issue and finally found the error. From former
> experiences and the fact that I failed in TransactionalEditingDomain I
> was mislead in my assumptions on the nature of the problem.
> Now I realized, it was just that I tried to add an object to the
> Notifier.eAdapters() list that was no Adapter and thus encountered an
> ArrayStoreException.
>
> Finally I came up with a simple proxy object derived from AdapterImpl
> which just forwards the notification to my EditPart's
> handleNotificationEvent(Notification notification) method and everything
> works fine :-)
>
> Thanks for your reply that helped me to find the solution,
> Henrik
>
>
> Christian W. Damus wrote:
>> Hi, Henrik,
>>
>> How does the TransactionalEditingDomain prevent the attachment of an
>> adapter? Do you mean that adding an Adapter to the Notifier.eAdapters
>> list fails?
>>
>> Cheers,
>>
>> Christian
<snip>
|
|
|
Goto Forum:
Current Time: Wed Jun 18 17:35:03 EDT 2025
Powered by FUDForum. Page generated in 0.07216 seconds
|