Home » Modeling » GMF (Graphical Modeling Framework) » LinkConstraint
| | |
Re: LinkConstraint [message #198585 is a reply to message #198569] |
Wed, 23 July 2008 13:47 |
Eclipse User |
|
|
|
Originally posted by: cdamus.zeligsoft.com
--=-gT52ZEd9Umim27Xh1lDz
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hi, Peter,
Sorry, my original reply on the OCL newsgroup should have used
"including" instead of "union".
Try this:
self->including(oppositeEnd).name <> Set{'Clas1', 'Class2'}
The union operation requires another collection, whereas including
requires a scalar value.
Cheers,
Christian
On Wed, 2008-07-23 at 15:26 +0200, Peter wrote:
> Hello Alex,
>
> then I get the Validation Error:
> Cannot find operation (union(Instance))
>
>
> > Hello Peter,
> >
> > source end link constraint:
> > self->union(oppositeEnd).name <> Set{'Class1', 'Class2'}
> >
> >
> > -----------------
> > Alex Shatalin
> >
> >
--=-gT52ZEd9Umim27Xh1lDz
Content-Type: text/html; charset=utf-8
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.16.0">
</HEAD>
<BODY>
Hi, Peter,<BR>
<BR>
Sorry, my original reply on the OCL newsgroup should have used "including" instead of "union".<BR>
<BR>
Try this:<BR>
<BR>
self->including(oppositeEnd).name <> Set{'Clas1', 'Class2'}<BR>
<BR>
The union operation requires another collection, whereas including requires a scalar value.<BR>
<BR>
Cheers,<BR>
<BR>
Christian<BR>
<BR>
<BR>
On Wed, 2008-07-23 at 15:26 +0200, Peter wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">Hello Alex,</FONT>
<FONT COLOR="#000000">then I get the Validation Error:</FONT>
<FONT COLOR="#000000">Cannot find operation (union(Instance))</FONT>
<FONT COLOR="#000000">> Hello Peter,</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> source end link constraint:</FONT>
<FONT COLOR="#000000">> self->union(oppositeEnd).name <> Set{'Class1', 'Class2'}</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> -----------------</FONT>
<FONT COLOR="#000000">> Alex Shatalin</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>
--=-gT52ZEd9Umim27Xh1lDz--
|
|
| |
Re: LinkConstraint [message #198606 is a reply to message #198585] |
Wed, 23 July 2008 14:04 |
Peter Mising name Messages: 95 Registered: July 2009 |
Member |
|
|
Hi Christian,
no problem! Thanks for your Help.
I changed it to including, but the I get the Error:
Cannot find operation (<>(Set(String))) for the type (Bag...
then the Message is cut.
> Hi, Peter,
>
> Sorry, my original reply on the OCL newsgroup should have used
> "including" instead of "union".
>
> Try this:
>
> self->including(oppositeEnd).name <> Set{'Clas1', 'Class2'}
>
> The union operation requires another collection, whereas including
> requires a scalar value.
>
> Cheers,
>
> Christian
>
>
> On Wed, 2008-07-23 at 15:26 +0200, Peter wrote:
>> Hello Alex,
>>
>> then I get the Validation Error:
>> Cannot find operation (union(Instance))
>>
>>
>> > Hello Peter,
>> >
>> > source end link constraint:
>> > self->union(oppositeEnd).name <> Set{'Class1', 'Class2'}
>> >
>> >
>> > -----------------
>> > Alex Shatalin
>> >
>> >
|
|
|
Re: LinkConstraint [message #198639 is a reply to message #198606] |
Wed, 23 July 2008 14:18 |
Eclipse User |
|
|
|
Originally posted by: cdamus.zeligsoft.com
--=-v79oxYa7cPpLN1AH02Yk
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hi, Peter,
Right. The implicit "collect" iterator in the ".name" navigation from a
set results in a bag.
So, one last try (this really should work):
self->including(oppositeEnd).name <> Bag{'Class1', 'Class2'}
or, if you like,
self->including(oppositeEnd).name->asSet() <> Set{'Class1',
'Class2'}
Cheers,
Christian
On Wed, 2008-07-23 at 16:04 +0200, Peter wrote:
> Hi Christian,
> no problem! Thanks for your Help.
> I changed it to including, but the I get the Error:
>
> Cannot find operation (<>(Set(String))) for the type (Bag...
>
> then the Message is cut.
>
>
>
> > Hi, Peter,
> >
> > Sorry, my original reply on the OCL newsgroup should have used
> > "including" instead of "union".
> >
> > Try this:
> >
> > self->including(oppositeEnd).name <> Set{'Clas1', 'Class2'}
> >
> > The union operation requires another collection, whereas including
> > requires a scalar value.
> >
> > Cheers,
> >
> > Christian
> >
> >
> > On Wed, 2008-07-23 at 15:26 +0200, Peter wrote:
> >> Hello Alex,
> >>
> >> then I get the Validation Error:
> >> Cannot find operation (union(Instance))
> >>
> >>
> >> > Hello Peter,
> >> >
> >> > source end link constraint:
> >> > self->union(oppositeEnd).name <> Set{'Class1', 'Class2'}
> >> >
> >> >
> >> > -----------------
> >> > Alex Shatalin
> >> >
> >> >
--=-v79oxYa7cPpLN1AH02Yk
Content-Type: text/html; charset=utf-8
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.16.0">
</HEAD>
<BODY>
Hi, Peter,<BR>
<BR>
Right. The implicit "collect" iterator in the ".name" navigation from a set results in a bag.<BR>
<BR>
So, one last try (this really should work):<BR>
<BR>
<FONT COLOR="#000000">self->including(oppositeEnd).name <> </FONT>Bag<FONT COLOR="#000000">{'Clas</FONT>s<FONT COLOR="#000000">1', 'Class2'}</FONT><BR>
<BR>
or, if you like,<BR>
<BR>
<FONT COLOR="#000000">self->including(oppositeEnd).name</FONT >->asSet()<FONT COLOR="#000000"> <> Set{'Clas</FONT>s<FONT COLOR="#000000">1', 'Class2'}</FONT><BR>
<BR>
Cheers,<BR>
<BR>
Christian<BR>
<BR>
On Wed, 2008-07-23 at 16:04 +0200, Peter wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">Hi Christian,</FONT>
<FONT COLOR="#000000">no problem! Thanks for your Help.</FONT>
<FONT COLOR="#000000">I changed it to including, but the I get the Error:</FONT>
<FONT COLOR="#000000">Cannot find operation (<>(Set(String))) for the type (Bag...</FONT>
<FONT COLOR="#000000">then the Message is cut.</FONT>
<FONT COLOR="#000000">> Hi, Peter,</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> Sorry, my original reply on the OCL newsgroup should have used </FONT>
<FONT COLOR="#000000">> "including" instead of "union".</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> Try this:</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> self->including(oppositeEnd).name <> Set{'Clas1', 'Class2'}</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> The union operation requires another collection, whereas including </FONT>
<FONT COLOR="#000000">> requires a scalar value.</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> Cheers,</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> Christian</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> On Wed, 2008-07-23 at 15:26 +0200, Peter wrote:</FONT>
<FONT COLOR="#000000">>> Hello Alex,</FONT>
<FONT COLOR="#000000">>></FONT>
<FONT COLOR="#000000">>> then I get the Validation Error:</FONT>
<FONT COLOR="#000000">>> Cannot find operation (union(Instance))</FONT>
<FONT COLOR="#000000">>></FONT>
<FONT COLOR="#000000">>></FONT>
<FONT COLOR="#000000">>> > Hello Peter,</FONT>
<FONT COLOR="#000000">>> > </FONT>
<FONT COLOR="#000000">>> > source end link constraint:</FONT>
<FONT COLOR="#000000">>> > self->union(oppositeEnd).name <> Set{'Class1', 'Class2'}</FONT>
<FONT COLOR="#000000">>> > </FONT>
<FONT COLOR="#000000">>> > </FONT>
<FONT COLOR="#000000">>> > -----------------</FONT>
<FONT COLOR="#000000">>> > Alex Shatalin</FONT>
<FONT COLOR="#000000">>> > </FONT>
<FONT COLOR="#000000">>> > </FONT>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>
--=-v79oxYa7cPpLN1AH02Yk--
|
|
|
Re: LinkConstraint [message #198647 is a reply to message #198639] |
Wed, 23 July 2008 14:33 |
Peter Mising name Messages: 95 Registered: July 2009 |
Member |
|
|
Yes this works!
Thanks!
> Hi, Peter,
>
> Right. The implicit "collect" iterator in the ".name" navigation from a
> set results in a bag.
>
> So, one last try (this really should work):
>
> self->including(oppositeEnd).name <> Bag{'Class1', 'Class2'}
>
> or, if you like,
>
> self->including(oppositeEnd).name->asSet() <> Set{'Class1', 'Class2'}
>
> Cheers,
>
> Christian
>
> On Wed, 2008-07-23 at 16:04 +0200, Peter wrote:
>> Hi Christian,
>> no problem! Thanks for your Help.
>> I changed it to including, but the I get the Error:
>>
>> Cannot find operation (<>(Set(String))) for the type (Bag...
>>
>> then the Message is cut.
>>
>>
>>
>> > Hi, Peter,
>> >
>> > Sorry, my original reply on the OCL newsgroup should have used
>> > "including" instead of "union".
>> >
>> > Try this:
>> >
>> > self->including(oppositeEnd).name <> Set{'Clas1', 'Class2'}
>> >
>> > The union operation requires another collection, whereas including
>> > requires a scalar value.
>> >
>> > Cheers,
>> >
>> > Christian
>> >
>> >
>> > On Wed, 2008-07-23 at 15:26 +0200, Peter wrote:
>> >> Hello Alex,
>> >>
>> >> then I get the Validation Error:
>> >> Cannot find operation (union(Instance))
>> >>
>> >>
>> >> > Hello Peter,
>> >> >
>> >> > source end link constraint:
>> >> > self->union(oppositeEnd).name <> Set{'Class1', 'Class2'}
>> >> >
>> >> >
>> >> > -----------------
>> >> > Alex Shatalin
>> >> >
>> >> >
|
|
|
Goto Forum:
Current Time: Sat Apr 20 01:43:26 GMT 2024
Powered by FUDForum. Page generated in 0.02687 seconds
|