Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Model Elemenet Types: "!" vs. "::"
Model Elemenet Types: "!" vs. "::" [message #582450] Mon, 02 November 2009 18:35 Go to next message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 156
Registered: October 2009
Senior Member

I am totally confused on the real diffrence between the two model element types character separator.

I was doing a simple model to model transformation. I have 2 ecore metamodles, and an epsilon model. I made a simple etl rule to test the transformation and, following the Tree2Graph example, used the ! character to separate elements. I kept getting a "Typed not found error" so I decided to try with the :: separator. So now the elements of the input metamodel where recognized but the ones form the output one not. So I changed the one for the output to ! and it all worked out.

So... when or how to know when to use one or the other? Does it has to do with some property of the metamodel ?

Thanks,

Horacio Hoyos


Horacio Hoyos Rodriguez
EngD Student
University Of York
Re: Model Elemenet Types: "!" vs. "::" [message #582466 is a reply to message #582450] Mon, 02 November 2009 23:14 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Horacio,

Apologies for the delayed response.

In Epsilon A!X.all returns all the instances of EClass X in model A. If
you omit ! and just write X.all it will return all the instances of X in
the first model of the launch configuration (useful when you have only
one model, e.g. in model validation). By contrast, :: is a package
separator that helps you to fully qualify names. For example if your
Ecore metamodel reads like this:

package foo {

package bar {

class X{}

}

class X{}

}

A!foo::bar::X.allInstances will return all the instances of the first X
EClass in model A while A!foo::X.allInstances will return all instances
of the second X EClass in model A.

If your metamodel reads like this (no ambiguity)

package foo {

package bar {

class X{}

}

}

A!X.allInstances will still return all the instances of X (there is no
need to specify the full foo::bar::X path).

I hope this helps. If not please let me know and I'll be happy to
provide further clarifications.

Cheers,
Dimitris

Horacio wrote:
> I am totally confused on the real diffrence between the two model
> element types character separator.
>
> I was doing a simple model to model transformation. I have 2 ecore
> metamodles, and an epsilon model. I made a simple etl rule to test the
> transformation and, following the Tree2Graph example, used the !
> character to separate elements. I kept getting a "Typed not found error"
> so I decided to try with the :: separator. So now the elements of the
> input metamodel where recognized but the ones form the output one not.
> So I changed the one for the output to ! and it all worked out.
>
> So... when or how to know when to use one or the other? Does it has to
> do with some property of the metamodel ?
>
> Thanks,
>
> Horacio Hoyos
Previous Topic:[Eugenia] Subdiagrams
Next Topic:DEFINE TWO DIFFERENT SIZED COMPARTMENT IN THE SAME ELEMENT
Goto Forum:
  


Current Time: Tue Dec 23 02:22:16 GMT 2014

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

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