Retrieve EditingModel from EObject [message #425142] |
Sun, 16 November 2008 15:53  |
Eclipse User |
|
|
|
Originally posted by: nuclearpsyche.gmail.com
Hello,
Is it possible to find out which EditingDomain a certain EObject belongs
to? (for example can I get the EditingDomain by only knowing the root
object?)
Thanks,
tamer
|
|
|
|
Re: Retrieve EditingModel from EObject [message #425169 is a reply to message #425143] |
Tue, 18 November 2008 01:54   |
Eclipse User |
|
|
|
Guys,
You can use AdapterFactoryEditingDomain.getEditingDomainFor...
Christian W. Damus wrote:
> Hi, Tamer,
>
> If you are working with a TransactionalEditingDomain, then you can use
> TransactionUtil::getEditingDomain(EObject) to find your answer.
>
> In a non-transactional editing domain, I don't think that there is
> traceability from the ResourceSet to the EditingDomain, though. You
> will need to know the workbench part that you're dealing with and
> adapt it to IEditingDomainProvider to get the editing domain from it.
>
> HTH,
>
> Christian
>
> Tamer wrote:
>> Hello,
>> Is it possible to find out which EditingDomain a certain EObject
>> belongs to? (for example can I get the EditingDomain by only knowing
>> the root object?)
>> Thanks,
>>
>> tamer
|
|
|
|
Re: Retrieve EditingModel from EObject [message #425217 is a reply to message #425143] |
Wed, 19 November 2008 17:20  |
Eclipse User |
|
|
|
Originally posted by: nuclearpsyche.gmail.com
Thank you very much Christian,
That's exactly what I needed.
tamer
Christian W. Damus wrote:
> Hi, Tamer,
>
> If you are working with a TransactionalEditingDomain, then you can use
> TransactionUtil::getEditingDomain(EObject) to find your answer.
>
> In a non-transactional editing domain, I don't think that there is
> traceability from the ResourceSet to the EditingDomain, though. You
> will need to know the workbench part that you're dealing with and adapt
> it to IEditingDomainProvider to get the editing domain from it.
>
> HTH,
>
> Christian
>
> Tamer wrote:
>> Hello,
>> Is it possible to find out which EditingDomain a certain EObject
>> belongs to? (for example can I get the EditingDomain by only knowing
>> the root object?)
>> Thanks,
>>
>> tamer
|
|
|
Powered by
FUDForum. Page generated in 0.12328 seconds