[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmt.amw] Re: dynamic attribute type

Hello,

I am not sure if I understood what you mean by "dynamic type"..

Anyway, you can define enumerations as you did in the weaving metamodel, since it is typically specified using KM3. Then, you can read the attribute value to do some special treatment, following your own requirements.

Regards,

Marcos.

Aram Hovsepyan wrote:
                        Hi Marcos,

        Another question on the definition of the weaving metamodel.

Is it possible to add dynamic attribute types.
Here is a simple example


        class Modification
        {
                attribute type : EcoreType;
                attribute newValue : Integer;
        }

        enumeration EcoreType {
                literal "Boolean";
                literal "String";
                literal "Integer";
        }

        I would like to have the type of attribute to depend on the selected
EcoreType rather than Integer.

thnx in advance.
regards,
Aram.