[ATL] how can I reference a remote metamodel [message #50905] |
Thu, 05 July 2007 17:44  |
Eclipse User |
|
|
|
Originally posted by: heggly.gmx.net
Hi again,
in my rule I am trying to add an ESuperType, something like:
u : MOF!EClass
(
name <- 'Composer',
eSuperTypes <- Supertype
)
The problem is that the supertype does not exist in my curent package but on
a remote server, so what I actually want to do is add a kind of reference to
that "remote" EClass.
The ECore file genereated should look like:
.....
<eClassifiers xsi:type="ecore:EClass" name="Composer"
eSuperTypes="http://www.remoteaddress/mm.ecore#//Supertype">
.....
</eClassifiers>
....
maybe something like
eSuperTypes <- remoteAddress::Supertype
Is that possible? Do I have to specify the remote model as a "IN" model?
I saw the "Metamodel by URI" option in the eclipse run configuration but I
dont have any concrete input model that is conform to that remote metamodel
(which I think I would have to specify).
Thanks!
Felix.
|
|
|
|
|
Re: [ATL] how can I reference a remote metamodel [message #51157 is a reply to message #51017] |
Fri, 06 July 2007 11:25  |
Eclipse User |
|
|
|
Hello,
There are several things you can do, for instance:
- use ant tasks, which should allow you to load a source model by URI
(cf., http://wiki.eclipse.org/index.php/AM3_Ant_Tasks)
- improve the launch config so that it allows "metamodel by uri" also
for models conforming to the metametamodel (e.g., when their metamodel
is #EMF), and submit the patch via bugzilla
- load a dummy model conforming to your "remote" metamodel, so that you
load it as a source metamodel
Regards,
Frédéric Jouault
Felix Förster wrote:
> "Frédéric Jouault" <frederic.jouault@univ-nantes.fr> schrieb im Newsbeitrag
> news:f6l8g0$lh4$1@build.eclipse.org...
>> Hello,
>>
>>> in my rule I am trying to add an ESuperType, something like:
>>>
>>> u : MOF!EClass
>>> (
>>> name <- 'Composer',
>>> eSuperTypes <- Supertype
>>> )
>>>
>>> The problem is that the supertype does not exist in my curent package
>> but on
>>> a remote server, so what I actually want to do is add a kind of
>> reference to
>>> that "remote" EClass.
>>> The ECore file genereated should look like:
>>>
>>> .....
>>> <eClassifiers xsi:type="ecore:EClass" name="Composer"
>>> eSuperTypes="http://www.remoteaddress/mm.ecore#//Supertype">
>>> .....
>>> </eClassifiers>
>>> ....
>>>
>>> maybe something like
>>> eSuperTypes <- remoteAddress::Supertype
>>>
>>> Is that possible? Do I have to specify the remote model as a "IN" model?
>>> I saw the "Metamodel by URI" option in the eclipse run configuration
>> but I
>>> dont have any concrete input model that is conform to that remote
>> metamodel
>>> (which I think I would have to specify).
>>
>> You need to load the metamodel as a source model (conforming to Ecore).
>> Then you navigate it to get the class you want.
>>
>
> I tried that but
> loading the remote model as a source model (with metamodel Ecore) does not
> work since the button "Metamodel by URI" only works for metamodels, not for
> models. The error: "The action is only available on metamodel"
> Anything else I can do?
>
>> Of course, this scenario can only work if you "allow inter-model
>> references" in the advanced tab of the launch config.
>>
>>
>> Regards,
>>
>> Frédéric Jouault
>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.27898 seconds