Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Using custom ResourceSet in editor
Using custom ResourceSet in editor [message #1105051] Mon, 09 September 2013 09:26 Go to next message
Goran K. Olsen is currently offline Goran K. OlsenFriend
Messages: 2
Registered: April 2013
Junior Member
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
Re: Using custom ResourceSet in editor [message #1105257 is a reply to message #1105051] Mon, 09 September 2013 15:40 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
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 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
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
>
Re: Using custom ResourceSet in editor [message #1108084 is a reply to message #1105257] Fri, 13 September 2013 10:11 Go to previous message
Goran K. Olsen is currently offline Goran K. OlsenFriend
Messages: 2
Registered: April 2013
Junior Member
Hi Ed,

followed your instructions and it works as expected.

Thanks!
Previous Topic:[cdo] does it support following feature
Next Topic:Non-generative REST
Goto Forum:
  


Current Time: Mon May 13 01:15:49 GMT 2024

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

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

Back to the top