|
Re: Empty default value literal for EReference not allowed [message #414829 is a reply to message #414825] |
Fri, 23 November 2007 13:14 |
Ed Merks Messages: 33145 Registered: July 2009 |
Senior Member |
|
|
Tobias,
I'm not even sure how to specify a default value for an association in
Rose... In any case, errors and warnings can all be ignored since the
builder will generally try to build a model that will not crash the
generator.
There is simply no support for default values for EReferences. They
would tend to be problematic in general. For example, for a non
containment reference, the default value would need to be contained
somewhere and even if the default value is in it's own resource, you'd
need to take steps to ensure that the resource is visible in every
resource set where the referencing object can be deserialized.. Also,
for containment references, a contained value can't be shared so a new
child would need to be created for each parent.
Tobias Langner wrote:
> Hey,
> when opening a EMF model (that was previously imported from a rose
> model) in the GenModel, I get several errors telling that the empty
> string ("") is not valid default value literal. The respective
> structural element is an EReference. Is there any reason why an empty
> string as default value literal for an EReference generates an error
> while any arbitrary string generates a warning only?
> As I understood so far, EReferences are not meant to have default
> value literals set, at least the ECore editor provides no means of
> editing it for an EReference. The model that we import from rose
> (yeah, that one again ;) ) provides default value literals for
> references, though. They are used as argument for the factory of the
> type in question (when code is generated in rose). Any way how we can
> do that in EMF?
>
> Thanks, cheers, Tobias
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02849 seconds