Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Using common external resources
Using common external resources [message #428921] Thu, 02 April 2009 00:16 Go to next message
Uri Shani is currently offline Uri ShaniFriend
Messages: 18
Registered: July 2009
Junior Member
In my model, I implemented a common name property for all classes via a
common superclass. Yet, the model is persisted using indexed references
also when using an external resource. When the resources are edited
separately from each other, they will become incompatible since the
indexed references will not be updated in disparate resources. However, if
references where using the name property of a resource, the symbolic
reference would withstand separate editing of resources as long as names
of child elements are unique in their parent's context. As we observe this
semantic in our implementation, this solution seems applicable.
Any idea how we can alter the persisting mechanism in our editor to work
with named references rather than indexed references? Will that indeed
help us use combination of resources in a true cooperative multi-user
development environment?

Many thanks in advance,
- Uri
Re: Using common external resources [message #428923 is a reply to message #428921] Thu, 02 April 2009 00:26 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Uri,

Comments below.

Uri Shani wrote:
> In my model, I implemented a common name property for all classes via
> a common superclass. Yet, the model is persisted using indexed
> references also when using an external resource.
That's the default. Did you use EAttribute.isID? Or EReference.eKeys?
> When the resources are edited separately from each other, they will
> become incompatible since the indexed references will not be updated
> in disparate resources.
Yes.
> However, if references where using the name property of a resource,
> the symbolic reference would withstand separate editing of resources
> as long as names of child elements are unique in their parent's context.
So it sounds like the name attribute should be a key with respect to the
containment reference that holds that "named element."
> As we observe this semantic in our implementation, this solution seems
> applicable.
> Any idea how we can alter the persisting mechanism in our editor to
> work with named references rather than indexed references?
It sounds like you'd want to set keys on your containment references...
> Will that indeed help us use combination of resources in a true
> cooperative multi-user development environment?
I think so.

The Ecore model specialized
InternalEObject.eURIFragmentSegment/eObjectForURIFragmentSeg ment in
EModelElementImpl for much the same purpose. That's another way...
>
> Many thanks in advance,
> - Uri
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Copy paste
Next Topic:[CDO] Installing CDO 2 & EMF 2.5 Help Required
Goto Forum:
  


Current Time: Wed Apr 24 19:13:07 GMT 2024

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

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

Back to the top