[Epsilon] top-level container in EOL [message #385354] |
Fri, 05 September 2008 23:23  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03163 seconds