melange icon indicating copy to clipboard operation
melange copied to clipboard

Metamodel annotations for model types inference

Open tdegueul opened this issue 10 years ago • 0 comments

There is currently two ways to define a model type. Either by extracting the exact type of an existing metamodel:

metamodel X {
    ecore "..."
    exactType XMT // <-- Always contains all the features of the Ecore (i.e. no filtering)
}

... or by explicit importing an Ecore file describing it:

modeltype XMT {
    ecore "..."
}

Ecore annotations may be used to explicitly specify the features to be exposed in a metamodel:

metamodel X {
    ecore "..."
    exactType XMT // <-- Reads @Exposed annotations in the Ecore file. Only exposes them.
}

tdegueul avatar Jan 26 '15 10:01 tdegueul