Skip to main content



      Home
Home » Archived » GMT (Generative Modeling Technologies) » [Epsilon] top-level container in EOL
[Epsilon] top-level container in EOL [message #385354] Fri, 05 September 2008 23:23 Go to next message
Eclipse UserFriend
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 04:17 Go to previous message
Eclipse UserFriend
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 04:17 Go to previous message
Eclipse UserFriend
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 Mar 22 11:36:57 EDT 2025

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

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

Back to the top