Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMT (Generative Modeling Technologies) » [Epsilon] top-level container in EOL
[Epsilon] top-level container in EOL [message #385354] Sat, 06 September 2008 03:23 Go to next message
Kimon Polychroniadis is currently offline Kimon PolychroniadisFriend
Messages: 30
Registered: July 2009
Member
Hello,

I was wondering whether there is a built-in operation to find the
top-lever container of a model element.

E.g.

A contains B contains C contains D

is there a method that allows me to find the top-level container, which
in that case would be container A?

Thank you in advance,
Kimon
Re: [Epsilon] top-level container in EOL [message #385355 is a reply to message #385354] Sat, 06 September 2008 08:17 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Kimon,

There is no such built-in operation. However, the following operation
should do the job:

operation Any topEContainer() {
if (self.eContainer().isDefined()) {
return self.eContainer().topEContainer();
}
else {
return self;
}
}

Cheers,
Dimitris

Kimon Polychroniadis wrote:
> Hello,
>
> I was wondering whether there is a built-in operation to find the
> top-lever container of a model element.
>
> E.g.
>
> A contains B contains C contains D
>
> is there a method that allows me to find the top-level container, which
> in that case would be container A?
>
> Thank you in advance,
> Kimon
Re: [Epsilon] top-level container in EOL [message #621765 is a reply to message #385354] Sat, 06 September 2008 08:17 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Kimon,

There is no such built-in operation. However, the following operation
should do the job:

operation Any topEContainer() {
if (self.eContainer().isDefined()) {
return self.eContainer().topEContainer();
}
else {
return self;
}
}

Cheers,
Dimitris

Kimon Polychroniadis wrote:
> Hello,
>
> I was wondering whether there is a built-in operation to find the
> top-lever container of a model element.
>
> E.g.
>
> A contains B contains C contains D
>
> is there a method that allows me to find the top-level container, which
> in that case would be container A?
>
> Thank you in advance,
> Kimon
Previous Topic:[Epsilon] top-level container in EOL
Next Topic:[Epsilon] wizards not finding operations
Goto Forum:
  


Current Time: Sat Nov 22 01:51:21 GMT 2014

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

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