|
Re: Using custom ResourceSet in editor [message #1105257 is a reply to message #1105051] |
Mon, 09 September 2013 15:40 |
Ed Merks Messages: 33147 Registered: July 2009 |
Senior Member |
|
|
Goran,
If you replace the editing domain's resource set, you must add an
instance of the
org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain.EditingDomainProvider
adapter to that resource set so that methods like
org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain.getEditingDomainFor(EObject)
work properly.
On 09/09/2013 2:36 PM, Goran K. Olsen wrote:
> Hi,
>
> We have extended ResourceSet and added custom resolving of proxy links.
>
> Generating a custom EMF editor, the resolving does not work since we
> are not using our own ResourceSet.
>
> We have tried to send it in to the editingDomain through the
> AdapterFactoryEditingDomain constructor (new
> AdapterFactoryEditingDomain(adapterFactory, commandStack, resourceSet)).
> By doing this, the proxy resolving works, but it seems like we have
> messed up the command stack, editing and saving is not working as
> expected.
>
> Is there a recommended way to achieve our goal?
>
> Best Regards,
> Gøran
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: Using custom ResourceSet in editor [message #1105324 is a reply to message #1105257] |
Mon, 09 September 2013 17:40 |
Ed Willink Messages: 7658 Registered: July 2009 |
Senior Member |
|
|
Hi Goran
I strongly recommend revisiting your custom ResourceSet design choice.
It is much better to limit yourself to an eAdapter that provides the
extra state allowing your functionality to co-exist with whatever other
frameworks may want to do.
Regards
Ed Willink
On 09/09/2013 16:40, Ed Merks wrote:
> Goran,
>
> If you replace the editing domain's resource set, you must add an
> instance of the
> org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain.EditingDomainProvider
> adapter to that resource set so that methods like
> org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain.getEditingDomainFor(EObject)
> work properly.
>
>
> On 09/09/2013 2:36 PM, Goran K. Olsen wrote:
>> Hi,
>>
>> We have extended ResourceSet and added custom resolving of proxy links.
>>
>> Generating a custom EMF editor, the resolving does not work since we
>> are not using our own ResourceSet.
>>
>> We have tried to send it in to the editingDomain through the
>> AdapterFactoryEditingDomain constructor (new
>> AdapterFactoryEditingDomain(adapterFactory, commandStack, resourceSet)).
>> By doing this, the proxy resolving works, but it seems like we have
>> messed up the command stack, editing and saving is not working as
>> expected.
>>
>> Is there a recommended way to achieve our goal?
>>
>> Best Regards,
>> Gøran
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03093 seconds