Type references for nested EClasses [message #1859499] |
Mon, 12 June 2023 11:59  |
Eclipse User |
|
|
|
Hello,
let's say that there is an EClass called "Foo" in an Ecore model "bar". "Foo" is in the package "baz".
If I were to import the Ecore model "bar" in my qvto file with "modeltype BAR uses <platform path>", I should be able to reference the EClass "Foo" in mapping signatures with "BAR::baz::Foo". Now I ask myself, why isn't "baz::Foo" sufficient? Root-level EClasses do not need an explicit mention of the model they are in.
Here's a concrete example - I am currently working with the Palladio metamodel. Consider the following mapping signatures:
The mapping signature
mapping RepositoryDefinition::cRepositoryToPalladioRepository() : repository::Repository is invalid because of unknown type repository::Repository, whilst "PALLADIO::repository::Repository" works fine.
The mapping signature
mapping PlaceholderClass::cPlaceholderClassToPalladioDummyClass() : DummyClass is however valid, despite not explicitly giving the full path of "PALLADIO:DummyClass".
RepositoryDefinition and PlaceholderClass are EClasses from my local metamodel CM, the main procedure has inModel set as CM and outModel as PALLADIO.
Is this working as intended? Why is the model name necessary to resolve nested EClasses?
Thanks in advance.
Regards
K.
[Updated on: Mon, 12 June 2023 18:47] by Moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03843 seconds