EMF Changeable problem [message #85568] |
Tue, 01 July 2008 09:28  |
Eclipse User |
|
|
|
Hello,
one more problem:
I tried to create an EMF-Model with ATL, that applies to an Ecore
metamodel of mine. On one attribute of the metamodel I set the property
changeable to false. My intention was to forbid the user of the
output-model to change some of the created/generated values.
Unfortunately ATL complains, that it cannot set this attribute ("message:
feature name is not changeable"). But there must be a way to initialize
the attribute. What sense does a read-only attribute make, when there is
no way to set the standard-value? Or can this only be used in combination
with a static default value in the metamodel and the modification has to
be controlled over the editor for the generated model-files?
Kind regards,
Max
|
|
|
|
Re: EMF Changeable problem [message #85640 is a reply to message #85584] |
Wed, 02 July 2008 03:51  |
Eclipse User |
|
|
|
Hi,
thanks for that idea. My problem is, that changing the .ecore file and
re-generating the model-code would overwrite the API-changes. So I'll
simply stick to the plan to make these attributes not changeable in the
editor for the model. This won't help if someone changes the model via the
API, but this is not planned at the moment.
Thanks,
Max
Ed Merks wrote:
> Max,
> If you make something unchangeable you should expect never to be able to
> change it. So generally it will be transient and likely will be
> derived, i.e., its value is computed from the value of something else.
> Perhaps you just want to suppress the setters from the API to make it
> difficult but not impossible for the user to change the value.
|
|
|
Powered by
FUDForum. Page generated in 0.03792 seconds