|Re: EAnnotation references between ecore models [message #903668 is a reply to message #903655]
||Fri, 24 August 2012 15:48
| Ed Merks
Registered: July 2009
On 24/08/2012 7:36 PM, AJ Ben wrote:
> Hi Ed#2,
> I tried your suggestion, but the new attribute is not populated with
> the data referenced in the other model.
Note that the generated EPackage will not generate the contents or
references features of an EAnnotation. If you set the GenPackage's
Initialize by Loading property to true, the generated package will
initialize by loading a serialized version of the Ecore model and that
will help preserve the containment and cross references of the EAnnotations.
> Maybe I missed something, here is what I did:
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="stpStopDate"
I would have expected this to be a relative reference within the
workspace. I imagine it will be problematic to load this at runtime if
this model isn't available in the workspace at runtime.
An alternative approach is that you record in the annotations details
map a key with the value <nsURI>#<fragmentURI> of the model you expect
will be available at runtime. So you can use
to locate the feature you're referencing.
Powered by FUDForum
. Page generated in 0.01653 seconds