Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] how can I reference a remote metamodel
[ATL] how can I reference a remote metamodel [message #50905] Thu, 05 July 2007 21:44 Go to next message
Eclipse UserFriend
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 #50961 is a reply to message #50905] Fri, 06 July 2007 11:19 Go to previous messageGo to next message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
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.

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
Re: [ATL] how can I reference a remote metamodel [message #51017 is a reply to message #50961] Fri, 06 July 2007 11:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: heggly.gmx.net

"Fr
Re: [ATL] how can I reference a remote metamodel [message #51157 is a reply to message #51017] Fri, 06 July 2007 15:25 Go to previous message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
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
>>
>
>
Previous Topic:[ATL] combined rules don't work
Next Topic:Apply Profiles to UML models?
Goto Forum:
  


Current Time: Tue Apr 23 10:13:23 GMT 2024

Powered by FUDForum. Page generated in 0.03306 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top